Commit 915d5e83 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/release2.2' into release2.2

parents 2b91e754 c9955a23
...@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站 ...@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站
# 捷道管理系统/开发环境 # 捷道管理系统/开发环境
VUE_APP_BASE_API = 'https://api.sit.jdshangmen.com' VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
......
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提单制作')" prop="ladingBillStatus">
<el-select v-model="queryParams.ladingBillStatus" :placeholder="$t('请选择提单制作状态')" clearable size="small">
<el-option v-for="(item,index) in ladingBillStatusData" :key="index" :label="item" :value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
...@@ -107,6 +113,12 @@ ...@@ -107,6 +113,12 @@
<el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" /> <el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" />
<el-table-column :label="$t('提单状态')" align="center" prop="ladingBillStatus" width="180">
<template slot-scope="scope">
<span>{{ ladingBillStatusData[scope.row.ladingBillStatus] }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('日期')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('日期')" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span> <span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span>
...@@ -232,6 +244,11 @@ export default { ...@@ -232,6 +244,11 @@ export default {
{ value: "5", label: this.$t("清关时间") }, { value: "5", label: this.$t("清关时间") },
{ value: "6", label: this.$t("卸柜时间") }, { value: "6", label: this.$t("卸柜时间") },
], ],
ladingBillStatusData: [
this.$t("未完成"),
this.$t("部分完成"),
this.$t("已完成"),
],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
......
...@@ -10,13 +10,14 @@ ...@@ -10,13 +10,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('装柜时间')" prop="ldBoxTime"> <el-form-item :label="$t('装柜时间')" prop="ldBoxTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> {{cabinetObj.ldBoxTime?new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss'):new Date().format('yyyy-MM-dd hh:mm:ss')}}
<!-- <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> -->
</el-form-item> </el-form-item>
<el-form-item :label="$t('出仓时间')"> <el-form-item :label="$t('出仓时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldOutWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldOutWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('装柜图片')"> <el-form-item :label="$t('装柜图片')">
<ImageUpload :limit="1" :isShowTip=false v-model="cabinetObj.ldPictures" /> <ImageUpload :limit="1" :isShowTip=false v-model="cabinetObj.ldPictures" @input="saveImage" />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -55,11 +56,7 @@ export default { ...@@ -55,11 +56,7 @@ export default {
// 装柜对象 // 装柜对象
cabinetObj: {}, cabinetObj: {},
// 校验 // 校验
rules: { rules: {},
ldBoxTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
}; };
}, },
created() { created() {
...@@ -136,6 +133,27 @@ export default { ...@@ -136,6 +133,27 @@ export default {
startCabinet() { startCabinet() {
this.dialogVisible = true; this.dialogVisible = true;
}, },
//自动保存图片
saveImage() {
const { ldPictures } = this.cabinetObj;
let pictures = ldPictures?.split(",") ?? [];
let newPictures = [];
for (const item of pictures) {
if (item) {
newPictures.push({
type: "image",
url: item,
});
}
}
cabinetCreate({
shipmentId: this.$attrs.shipmentObj.id,
ldPictures: newPictures.length ? JSON.stringify(newPictures) : "",
operateType: 1,
}).then(()=>{
this.$emit("getBoxInfo");
})
}
}, },
computed: { computed: {
isStartCabinet() { isStartCabinet() {
......
...@@ -55,6 +55,11 @@ ...@@ -55,6 +55,11 @@
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="destination">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'name')" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderNo"> <el-form-item :label="$t('订单号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable /> <el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable />
</el-form-item> </el-form-item>
...@@ -161,6 +166,7 @@ import { ...@@ -161,6 +166,7 @@ import {
getCapacity, getCapacity,
sumStatistics, sumStatistics,
} from "../../utils"; } from "../../utils";
import {getCountryListAll} from "@/api/ecw/country";
/** /**
* 补单 * 补单
*/ */
...@@ -169,6 +175,8 @@ export default { ...@@ -169,6 +175,8 @@ export default {
inheritAttrs: false, inheritAttrs: false,
data() { data() {
return { return {
//国家列表
countryList:[],
// 二维码/条码编号 // 二维码/条码编号
cabinetNo: "", cabinetNo: "",
// 表格数据 // 表格数据
...@@ -193,6 +201,9 @@ export default { ...@@ -193,6 +201,9 @@ export default {
}, },
created() { created() {
this.queryAllData(); this.queryAllData();
getCountryListAll().then(r => {
this.countryList = r.data
})
}, },
methods: { methods: {
/* 查询已预装 */ /* 查询已预装 */
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('包装数量与单位')" class="two-element"> <el-form-item :label="$t('包装数量与单位')" class="two-element">
<el-input v-model="subMaterialObj.packageNum" :placeholder="$t('请输入包装数量')"></el-input> <el-input v-model="subMaterialObj.packageNum" :placeholder="$t('请输入包装数量')"></el-input>
<dict-selector v-model="subMaterialObj.packageUnit" type="packaging_type" /> <dict-selector v-model="subMaterialObj.packageUnit" type="goods_package_type" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('货物毛重(KGS)')"> <el-form-item :label="$t('货物毛重(KGS)')">
<el-input v-model="subMaterialObj.kgs" :placeholder="$t('请输入货物毛重') + '(KGS)'"></el-input> <el-input v-model="subMaterialObj.kgs" :placeholder="$t('请输入货物毛重') + '(KGS)'"></el-input>
......
...@@ -696,11 +696,12 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount"; ...@@ -696,11 +696,12 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { listSimpleDepts } from "@/api/system/dept"; import { listSimpleDepts } from "@/api/system/dept";
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
import { createReceipt,getFirstReceivableListByOrderId, getReceivableList, getReceivableInfoByIds, getReceiptInfoByIds, getReceiptAccountList, getInvoicingItem, updateReceipt, updateReceivableDiscountById, getReceivableDiscountLogById } from "@/api/ecw/financial"; import { createReceipt,getFirstReceivableListByOrderId, getReceivableList, getReceivableItemDetail, getReceiptInfoByIds, getReceiptAccountList, getInvoicingItem, updateReceipt, updateReceivableDiscountById, getReceivableDiscountLogById } from "@/api/ecw/financial";
import {getCustomer} from '@/api/ecw/customer' import {getCustomer} from '@/api/ecw/customer'
import NP from 'number-precision' import NP from 'number-precision'
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import { getExchangeRatePage } from "@/api/ecw/exchangeRate";
import ret from "bluebird/js/release/util"; import ret from "bluebird/js/release/util";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";
...@@ -736,7 +737,7 @@ export default { ...@@ -736,7 +737,7 @@ export default {
bankData: [], bankData: [],
params: { params: {
page: 1, page: 1,
rows: 20, rows: 100,
}, },
deptData: [], deptData: [],
deptArr: [], deptArr: [],
...@@ -767,7 +768,9 @@ export default { ...@@ -767,7 +768,9 @@ export default {
pageSize: 100 pageSize: 100
}, },
pages:1 pages:1,
rateList:[],
orderNo:null
}; };
}, },
activated(){ activated(){
...@@ -777,7 +780,9 @@ export default { ...@@ -777,7 +780,9 @@ export default {
this.getReceivableData() this.getReceivableData()
} }
if (this.$route.query.receiptId && this.$route.query.receiptId != 0) { if (this.$route.query.receiptId && this.$route.query.receiptId != 0) {
this.receiptId = this.$route.query.receiptId; this.receiptId = this.$route.query.receiptId;
this.orderNo = this.$route.query.orderNo||'';
this.getReceivableInfo() this.getReceivableInfo()
}else{ }else{
this.removeData() this.removeData()
...@@ -812,6 +817,7 @@ export default { ...@@ -812,6 +817,7 @@ export default {
}) })
// 获取汇率 // 获取汇率
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
await getExchangeRatePage(this.params).then(res => this.rateList = res.data.list)
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then(res => this.warehouseList = res.data)
let that = this; let that = this;
if (that.$route.query.orderId) { if (that.$route.query.orderId) {
...@@ -836,6 +842,7 @@ export default { ...@@ -836,6 +842,7 @@ export default {
} }
if (that.$route.query.receiptId && that.$route.query.receiptId !== '0') { if (that.$route.query.receiptId && that.$route.query.receiptId !== '0') {
this.receiptId = this.$route.query.receiptId; this.receiptId = this.$route.query.receiptId;
this.orderNo = this.$route.query.orderNo||'';
this.getReceivableInfo() this.getReceivableInfo()
} }
...@@ -973,8 +980,8 @@ export default { ...@@ -973,8 +980,8 @@ export default {
}) })
}, },
getReceivableInfo(){ getReceivableInfo(){
getReceivableInfoByIds({ id: this.receiptId }).then(res => { getReceivableItemDetail({ id: this.receiptId,orderNo:this.orderNo }).then(res => {
this.list = [{...res.data}] this.list = res.data
this.list.map(v=>{ this.list.map(v=>{
if(!v.taxPoint){ if(!v.taxPoint){
v.taxAmount = v.totalAmount v.taxAmount = v.totalAmount
...@@ -1008,11 +1015,18 @@ export default { ...@@ -1008,11 +1015,18 @@ export default {
// if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN() // if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN()
// if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS() // if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS()
// if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB() // if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB()
row.collectionRate = NP.times(this.currencyList.find(v => v.id === row.currencyId).huilv/100, this.currencyList.find(v => v.id === val).exchangeToFc/100).toFixed(6) // row.collectionRate = NP.times(this.currencyList.find(v => v.id === row.currencyId).huilv/100, this.currencyList.find(v => v.id === val).exchangeToFc/100).toFixed(6)
row.collectionRate = this.getRate(row.currencyId,val)
} }
this.rateChange(row, index) this.rateChange(row, index)
}, },
//获取汇率
getRate(sourceCurrencyId,targetCurrencyId){
var rate = this.rateList.find(v=>(v.sourceCurrencyId === sourceCurrencyId&&v.targetCurrencyId===targetCurrencyId))
if(rate) return rate.currencyRate
return 1
},
writeOffRateChange(row, index) { writeOffRateChange(row, index) {
row.writeOffAmount = Math.round(NP.times(row.writeOffRate || 0, NP.minus(row.receivableAmount, row.discountTotal))) row.writeOffAmount = Math.round(NP.times(row.writeOffRate || 0, NP.minus(row.receivableAmount, row.discountTotal)))
...@@ -1095,7 +1109,7 @@ export default { ...@@ -1095,7 +1109,7 @@ export default {
discountTotal: discountDollar, discountTotal: discountDollar,
currencyId: item.id, currencyId: item.id,
receivableAmount: Math.round(dollar), receivableAmount: Math.round(dollar),
writeOffRate: item.id==this.showCurrencyId?1: NP.times(this.currencyList.find(v => v.id === item.id).huilv/100, this.currencyList.find(v => v.id === this.showCurrencyId).exchangeToFc/100).toFixed(6), writeOffRate: item.id==this.showCurrencyId?1: this.getRate(item.id,this.showCurrencyId),
platformAccountId: t?.platformAccountId || '', platformAccountId: t?.platformAccountId || '',
collectionCurrencyId: item.id, collectionCurrencyId: item.id,
collectionRate: 1 collectionRate: 1
......
...@@ -497,13 +497,39 @@ export default { ...@@ -497,13 +497,39 @@ export default {
}, },
activated(){ activated(){
console.log(11) console.log(11)
// this.getList(); if (this.$route.query.payableId && this.$route.query.payableId != 0) {
this.payableId = this.$route.query.payableId;
getPayableInfoByIds({ id: this.payableId }).then(res => {
this.handleSelectionChange([res.data])
this.list = this.multipleSelection
this.$set(this.form, 'supplierId', res.data.supplierId)
this.selectChange(this.form.supplierId)
})
}
if (that.$route.query.id && that.$route.query.id !== '0') {
this.id = this.$route.query.id;
getPaymentInfoByIds({ id: this.id }).then(res => {
this.form = {
...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'),
invoiceStatus: String(res.data.invoiceStatus),
}
this.$set(this.form,'supplierBankAccount',res.data.supplierBankAccount)
console.log(this.form)
})
getPaymentItem({ id: this.id }).then(res => {
this.list = [...res.data]
this.defaultList = [...res.data]
})
}
}, },
async created() { async created() {
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then(res => this.warehouseList = res.data)
let that = this; let that = this;
if (that.$route.query.payableId && that.$route.query.payableId !== '0') { if (that.$route.query.payableId && that.$route.query.payableId != 0) {
this.payableId = this.$route.query.payableId; this.payableId = this.$route.query.payableId;
getPayableInfoByIds({ id: this.payableId }).then(res => { getPayableInfoByIds({ id: this.payableId }).then(res => {
this.handleSelectionChange([res.data]) this.handleSelectionChange([res.data])
......
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<!-- <div style="margin: 20px 0;font-size:16px">备注:收款单已全部核销,总金额差值小于5$,允许全部核销,核销比例应为100%</div> --> <div style="margin: 20px 0;font-size:16px" v-if="form.finaceRemark">{{form.finaceRemark}}</div>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button> <el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6" type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button> <el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6" type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
...@@ -542,6 +542,7 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount"; ...@@ -542,6 +542,7 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { listSimpleDepts } from "@/api/system/dept"; import { listSimpleDepts } from "@/api/system/dept";
import { getCustomer } from '@/api/ecw/customer' import { getCustomer } from '@/api/ecw/customer'
import { getExchangeRatePage } from "@/api/ecw/exchangeRate";
import { import {
getReceiptInfoByIds, getReceiptInfoByIds,
...@@ -618,7 +619,8 @@ export default { ...@@ -618,7 +619,8 @@ export default {
detailShow:false, detailShow:false,
detailIndex:1, detailIndex:1,
wiffShow:false, wiffShow:false,
wiffRemark:'' wiffRemark:'',
rateList:[]
} }
}, },
computed: { computed: {
...@@ -698,6 +700,7 @@ export default { ...@@ -698,6 +700,7 @@ export default {
async created() { async created() {
// 获取汇率 // 获取汇率
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
await getExchangeRatePage(this.params).then(res => this.rateList = res.data.list)
await listSimpleDepts().then((res) => { await listSimpleDepts().then((res) => {
res.data.forEach((item) => { res.data.forEach((item) => {
if (item.parentId == 0) { if (item.parentId == 0) {
...@@ -1077,10 +1080,16 @@ export default { ...@@ -1077,10 +1080,16 @@ export default {
// else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB() // else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB()
// else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN() // else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN()
// else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN() // else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN()
rate = NP.times(this.currencyList.find(v => v.id === val).huilv/100, this.currencyList.find(v => v.id === this.showCurrencyId).exchangeToFc/100).toFixed(6) rate = this.getRate()
} }
this.$set(this.addForm, 'rate', rate) this.$set(this.addForm, 'rate', rate)
}, },
//获取汇率
getRate(sourceCurrencyId,targetCurrencyId){
var rate = this.rateList.find(v=>(v.sourceCurrencyId === sourceCurrencyId&&v.targetCurrencyId===targetCurrencyId))
if(rate) return rate.currencyRate
return 1
},
getList() { getList() {
getReceivableItem({ id: this.id }).then(res => { getReceivableItem({ id: this.id }).then(res => {
this.detailed = res.data.map(v => ({ this.detailed = res.data.map(v => ({
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" v-hasPermi="['ecw:receivable:collection']" @click="handleAdd(scope.row.id)" >{{ $t('收款') }}</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:receivable:collection']" @click="handleAdd(scope.row)" >{{ $t('收款') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -350,8 +350,8 @@ export default { ...@@ -350,8 +350,8 @@ export default {
this.getList(); this.getList();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd(id) { handleAdd(row) {
return this.$router.push("creatCollection?receiptId=" + id); return this.$router.push("creatCollection?receiptId=" + row.id+'&orderNo='+row.orderNo);
}, },
submitForm() {}, submitForm() {},
}, },
......
...@@ -48,6 +48,11 @@ ...@@ -48,6 +48,11 @@
<el-form-item :label="$t('供应商类别')" prop="companyType"> <el-form-item :label="$t('供应商类别')" prop="companyType">
<dict-selector v-model="formData.companyTypeArr" type="company_type" multiple disabled /> <dict-selector v-model="formData.companyTypeArr" type="company_type" multiple disabled />
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的港码头')" prop="dockIds">
<el-select v-model="formData.dockIds" filterable multiple clearable disabled>
<el-option v-for="(item) in allDocks" :key="item.id" :label="$l(item, 'title')" :value="item.id"></el-option>
</el-select>
</el-form-item>
</div> </div>
<div> <div>
...@@ -420,6 +425,7 @@ export default { ...@@ -420,6 +425,7 @@ export default {
this.formData = response.data this.formData = response.data
this.$set(this.formData, 'companyTypeArr', this.strToArray(response.data.companyType)) this.$set(this.formData, 'companyTypeArr', this.strToArray(response.data.companyType))
this.$set(this.formData, 'dockIds', this.strToArray(response.data.dockIds))
this.$set(this.formData, 'priceAdvantage', response.data.priceAdvantage==0?'':response.data.priceAdvantage) this.$set(this.formData, 'priceAdvantage', response.data.priceAdvantage==0?'':response.data.priceAdvantage)
this.$set(this.formData, 'settlementPeriod', response.data.settlementPeriod==0?null:response.data.settlementPeriod) this.$set(this.formData, 'settlementPeriod', response.data.settlementPeriod==0?null:response.data.settlementPeriod)
this.formData.bankList.forEach(item => { this.formData.bankList.forEach(item => {
......
...@@ -17,18 +17,10 @@ ...@@ -17,18 +17,10 @@
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-form-item :label="$t('合作开始时间')" prop="cooperationDateStart" label-width="120px" :rules="[{ <el-form-item :label="$t('合作开始时间')" prop="cooperationDateStart" label-width="120px">
required: formData.areaType==1,
message: this.$t('请填写合作开始时间'),
trigger: 'change'
}]">
<el-date-picker v-model="formData.cooperationDateStart" value-format="timestamp" clearable></el-date-picker> <el-date-picker v-model="formData.cooperationDateStart" value-format="timestamp" clearable></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('合作结束时间')" prop="cooperationDateEnd" label-width="120px" :rules="[{ <el-form-item :label="$t('合作结束时间')" prop="cooperationDateEnd" label-width="120px">
required: formData.areaType==1,
message: this.$t('请填写合作结束时间'),
trigger: 'change'
}]">
<el-date-picker v-model="formData.cooperationDateEnd" value-format="timestamp" clearable></el-date-picker> <el-date-picker v-model="formData.cooperationDateEnd" value-format="timestamp" clearable></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
...@@ -64,6 +56,11 @@ ...@@ -64,6 +56,11 @@
<el-form-item :label="$t('供应商类别')" prop="companyType"> <el-form-item :label="$t('供应商类别')" prop="companyType">
<dict-selector v-model="formData.companyTypeArr" type="company_type" multiple /> <dict-selector v-model="formData.companyTypeArr" type="company_type" multiple />
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的港码头')" prop="dockIds">
<el-select v-model="formData.dockIds" filterable multiple clearable>
<el-option v-for="(item) in allDocks" :key="item.id" :label="$l(item, 'title')" :value="item.id"></el-option>
</el-select>
</el-form-item>
</div> </div>
<div> <div>
...@@ -417,7 +414,7 @@ ...@@ -417,7 +414,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('包装单位')" prop="packUnit"> <el-form-item :label="$t('包装单位')" prop="packUnit">
<!-- <el-input v-model="formData.externalVO.packUnit" :placeholder="$t('请输入包装单位')" show-word-limit clearable></el-input> --> <!-- <el-input v-model="formData.externalVO.packUnit" :placeholder="$t('请输入包装单位')" show-word-limit clearable></el-input> -->
<dict-selector v-model="formData.externalVO.packUnit" type="packaging_type" /> <dict-selector v-model="formData.externalVO.packUnit" type="goods_package_type" />
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
...@@ -426,7 +423,7 @@ ...@@ -426,7 +423,7 @@
<el-option v-for="(item) in requireData" :value="item" :label="item" :key="item" /> <el-option v-for="(item) in requireData" :value="item" :label="item" :key="item" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="formData.externalVO.clearanceRequireData=='自定义'" :label="$t('自定义要求')" prop="clearanceRequire"> <el-form-item v-if="formData.externalVO.clearanceRequireData==$t('自定义')" :label="$t('自定义要求')" prop="clearanceRequire">
<el-input v-model="formData.externalVO.clearanceRequire" :placeholder="$t('请输入自定义要求')" show-word-limit clearable></el-input> <el-input v-model="formData.externalVO.clearanceRequire" :placeholder="$t('请输入自定义要求')" show-word-limit clearable></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -441,6 +438,11 @@ ...@@ -441,6 +438,11 @@
<el-input v-model="formData.externalVO.badCooperationRecord" :placeholder="$t('请输入合作不良记录登记')" show-word-limit clearable></el-input> <el-input v-model="formData.externalVO.badCooperationRecord" :placeholder="$t('请输入合作不良记录登记')" show-word-limit clearable></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div>
<el-form-item :label="$t('TIN NO./RC NO.')" prop="tinNoRcNo" label-width="250">
<el-input v-model="formData.externalVO.tinNoRcNo" :placeholder="$t('请输入TIN NO./RC NO.')" type="textarea" style="width: 300px;" show-word-limit clearable></el-input>
</el-form-item>
</div>
</div> </div>
...@@ -663,7 +665,7 @@ export default { ...@@ -663,7 +665,7 @@ export default {
allDocks: [], allDocks: [],
currencyList:[], currencyList:[],
requireData: [ requireData: [
'COO证书','CXX证书','ABC证书','QWE证书','自定义' this.$t('CTN证书'),this.$t('COC证书'),this.$t('SONCAP证书'),this.$t('自定义')
], ],
fileList: [], fileList: [],
fileNoForm: {}, fileNoForm: {},
...@@ -758,6 +760,7 @@ export default { ...@@ -758,6 +760,7 @@ export default {
this.formData = response.data this.formData = response.data
this.$set(this.formData, 'companyTypeArr', this.strToArray(response.data.companyType)) this.$set(this.formData, 'companyTypeArr', this.strToArray(response.data.companyType))
this.$set(this.formData, 'dockIds', this.strToArray(response.data.dockIds))
this.$set(this.formData, 'settlementPeriod', response.data.settlementPeriod==0?null:response.data.settlementPeriod) this.$set(this.formData, 'settlementPeriod', response.data.settlementPeriod==0?null:response.data.settlementPeriod)
this.$set(this.formData, 'priceAdvantage', response.data.priceAdvantage==0?null:response.data.priceAdvantage) this.$set(this.formData, 'priceAdvantage', response.data.priceAdvantage==0?null:response.data.priceAdvantage)
this.formData.bankList.forEach(item => { this.formData.bankList.forEach(item => {
...@@ -943,6 +946,7 @@ export default { ...@@ -943,6 +946,7 @@ export default {
let data = JSON.parse(JSON.stringify(this.formData)) let data = JSON.parse(JSON.stringify(this.formData))
if(this.formData.areaType == 0) { if(this.formData.areaType == 0) {
data.resourceVO.shipCompany = data.resourceVO.shipCompany?.toString() data.resourceVO.shipCompany = data.resourceVO.shipCompany?.toString()
data.dockIds = data.dockIds?.toString()
data.resourceVO.ports = data.resourceVO.ports?.toString() data.resourceVO.ports = data.resourceVO.ports?.toString()
data.resourceVO.bookCompany = data.resourceVO.bookCompany?.toString() data.resourceVO.bookCompany = data.resourceVO.bookCompany?.toString()
data.resourceVO.trailerCompany = data.resourceVO.trailerCompany?.toString() data.resourceVO.trailerCompany = data.resourceVO.trailerCompany?.toString()
......
...@@ -59,26 +59,13 @@ ...@@ -59,26 +59,13 @@
<el-table-column label="" align="center" prop="id" /> <el-table-column label="" align="center" prop="id" />
<el-table-column :label="$t('供应商代码')" align="center" prop="companyCode" /> <el-table-column :label="$t('供应商代码')" align="center" prop="companyCode" />
<el-table-column :label="$t('公司名称')" align="center" :prop="$l('company')" /> <el-table-column :label="$t('公司名称')" align="center" :prop="$l('company')" />
<!--el-table-column :label="$t('英文名称')" align="center" prop="companyEn" /-->
<el-table-column :label="$t('公司电话')" align="center" prop="tell" />
<el-table-column :label="$t('供应商类别')" align="center" prop="companyType" >
<template slot-scope="{row}">
<template v-for="type in row.companyType.split(',')">
<dict-tag type="company_type" :value="type" :key="type" />
</template>
</template>
</el-table-column>
<el-table-column :label="$t('境内外')" align="center" prop="areaType"> <el-table-column :label="$t('境内外')" align="center" prop="areaType">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ areaData[scope.row.areaType] }}</span> <span>{{ areaData[scope.row.areaType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('合作类型')" align="center" prop="cooperationType"> <el-table-column :label="$t('码头')" align="center" prop="dockIds" />
<template slot-scope="{row}"> <el-table-column :label="$t('清关要求')" align="center" prop="clearanceRequireData" />
<dict-tag type="cooperation_type" :value="row.cooperationType" />
</template>
</el-table-column>
<el-table-column :label="$t('统一信用代码')" align="center" prop="licenseNumber" />
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
...@@ -105,6 +92,7 @@ ...@@ -105,6 +92,7 @@
<script> <script>
import { createSupplier, updateSupplier, deleteSupplier, getSupplier, getSupplierPage, exportSupplierExcel } from "@/api/ecw/supplier"; import { createSupplier, updateSupplier, deleteSupplier, getSupplier, getSupplierPage, exportSupplierExcel } from "@/api/ecw/supplier";
// import DictSelector from '@/components/DictSelector' // import DictSelector from '@/components/DictSelector'
import { getDockPage } from "@/api/ecw/dock";
export default { export default {
name: "Supplier", name: "Supplier",
components: { components: {
...@@ -163,7 +151,8 @@ export default { ...@@ -163,7 +151,8 @@ export default {
companyZh: [{ required: true, message: this.$t("公司名称不能为空"), trigger: "blur" }], companyZh: [{ required: true, message: this.$t("公司名称不能为空"), trigger: "blur" }],
companyType: [{ required: true, message: this.$t("供应商类别不能为空"), trigger: "change" }], companyType: [{ required: true, message: this.$t("供应商类别不能为空"), trigger: "change" }],
cooperationType: [{ required: true, message: this.$t("合作类型不能为空"), trigger: "change" }], cooperationType: [{ required: true, message: this.$t("合作类型不能为空"), trigger: "change" }],
} },
allDocks: []
}; };
}, },
created() { created() {
...@@ -171,14 +160,23 @@ export default { ...@@ -171,14 +160,23 @@ export default {
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { async getList() {
this.list = []
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.allDocks = await getDockPage({ pageNo: "1", pageSize: "10000" })
this.allDocks = this.allDocks.data.list
// 执行查询 // 执行查询
getSupplierPage(params).then(response => { getSupplierPage(params).then(response => {
this.list = response.data.list; response.data.list.forEach(item=>{
item.dockIds = this.dockIds(item.dockIds,this.allDocks)
if(item.externalVO && item.externalVO.clearanceRequireData){
item.clearanceRequireData = item.externalVO.clearanceRequireData
}
this.list.push(item)
})
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
...@@ -188,6 +186,18 @@ export default { ...@@ -188,6 +186,18 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
dockIds(str,data){
if(typeof str != 'string') return ''
let dockArr = str.split(',')
let r = []
dockArr.forEach(item=>{
let dock = data.find(prop=>prop.id == item)
if(dock){
r.push(this.$l(dock, 'title'))
}
})
return r.toString()
},
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.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