Commit 3413c7fa authored by 邓春圆's avatar 邓春圆

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

parents 51416852 a45f0db6
......@@ -50,7 +50,12 @@ export default {
padding: 50px;
text-align: center;
}
$sizes: 0, 10,20,30,50,100,150,200,300,500,800,1000;
/*给el-input-number一个紧凑的样式*/
.el-input-number.is-controls-right.tight .el-input__inner{
padding-right: 30px;
padding-left: 5px;
}
$sizes: 0, 10,20,30,50,75,100,150,200,300,500,800,1000;
@for $i from 1 through length($sizes){
$item: nth($sizes, $i);
.ml-#{$item}{
......
......@@ -5,7 +5,7 @@ export function listOperateLog(query) {
return request({
url: '/system/operate-log/page',
method: 'get',
timeout: 5*6000,
timeout: 5*60000,
params: query
})
}
......@@ -16,7 +16,7 @@ export function exportOperateLog(query) {
url: '/system/operate-log/export',
method: 'get',
params: query,
timeout: 5*6000,
timeout: 5*60000,
responseType: 'blob'
})
}
......@@ -201,7 +201,7 @@ export default {
/* doc.save("a4.pdf");
return Promise.reject() */
let form = new FormData()
let file = this.currRow.orderNo + '-' + orderData.marks + '.pdf' //this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
let file = this.selfNo + "-" + this.currRow.tidanNo + ' ' + orderData.marks + '.pdf' //this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'}))
form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/
......
......@@ -785,7 +785,7 @@ export default {
},
/* 获取参数 */
getParams() {
const { rucangtime = [] } = this.queryParams;
let rucangtime = this.queryParams.rucangtime?this.queryParams.rucangtime:[]
return {
...this.queryParams,
...this.$attrs.params,
......
......@@ -376,7 +376,7 @@
<template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<div v-else>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?(itemAmount?itemAmount.currencyNameZh:''):(itemAmount?itemAmount.currencyNameEn:'')}}: {{ itemAmount.amount||''}}</div>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?(itemAmount?itemAmount.currencyNameZh:''):(itemAmount?itemAmount.currencyNameEn:'')}}: {{ itemAmount?itemAmount.amount:''}}</div>
<!-- <div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> -->
......@@ -746,8 +746,16 @@ export default {
};
},
activated(){
console.log(11)
// this.getList();
if (this.$route.query.id) {
this.flag = true
this.id = this.$route.query.id;
this.getReceivableData()
}
console.log(this.$route.query.receiptId)
if (this.$route.query.receiptId && this.$route.query.receiptId !== '0') {
this.receiptId = this.$route.query.receiptId;
this.getReceivableInfo()
}
},
async created() {
getUserProfile().then(res => {
......@@ -775,69 +783,11 @@ export default {
if (that.$route.query.id) {
this.flag = true
this.id = this.$route.query.id;
console.log(this.id)
getReceiptInfoByIds({ id: this.id }).then(res => {
if(res.data.rateValidateDate) res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
this.form = Object.assign({}, this.form, res.data)
})
await getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
})
getReceiptAccountList({ id: this.id }).then(res => {
if (res.data.length > 0) {
// totalAmount
res.data = [...res.data, {
type: 'total',
writeOffAmount: res.data.reduce((total, currentValue) => NP.plus(total, currentValue.writeOffAmount || 0), 0),
collectionAmount: []
}]
}
this.$set(this.form, 'receiptAccountList', [...res.data])
this.$nextTick(() => {
// const dollarList = this.list.filter(v => v.currencyId === 1)
// const discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const d = this.form.receiptAccountList.find(v => v.currencyId == 1)
// d && (d.discountTotal = discountDollar)
// const rmbList = this.list.filter(v => v.currencyId === 2)
// const discountRmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const r = this.form.receiptAccountList.find(v => v.currencyId == 2)
// r && (r.discountTotal = discountRmb)
// const nairaList = this.list.filter(v => v.currencyId === 3)
// const discountNaira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const n = this.form.receiptAccountList.find(v => v.currencyId == 3)
// n && (n.discountTotal = discountNaira)
this.form.receiptAccountList.forEach((item, index) => {
this.rateChange(item, index)
});
this.calculation()
})
})
this.getReceivableData()
}
if (that.$route.query.receiptId && that.$route.query.receiptId !== '0') {
this.receiptId = this.$route.query.receiptId;
getReceivableInfoByIds({ id: this.receiptId }).then(res => {
this.list = [{...res.data}]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
this.calculation()
getOrder(res.data.orderId).then(response => {
// console.log(response.data)
if(response.data.customerId) this.$set(this.form,'customerId',response.data.customerId)
})
})
this.getReceivableInfo()
}
// this.getList();
......@@ -904,6 +854,69 @@ export default {
}
},
methods: {
getReceivableData(){
getReceiptInfoByIds({ id: this.id }).then(res => {
if(res.data.rateValidateDate) res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
this.form = Object.assign({}, this.form, res.data)
})
getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
})
getReceiptAccountList({ id: this.id }).then(res => {
if (res.data.length > 0) {
// totalAmount
res.data = [...res.data, {
type: 'total',
writeOffAmount: res.data.reduce((total, currentValue) => NP.plus(total, currentValue.writeOffAmount || 0), 0),
collectionAmount: []
}]
}
this.$set(this.form, 'receiptAccountList', [...res.data])
this.$nextTick(() => {
// const dollarList = this.list.filter(v => v.currencyId === 1)
// const discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const d = this.form.receiptAccountList.find(v => v.currencyId == 1)
// d && (d.discountTotal = discountDollar)
// const rmbList = this.list.filter(v => v.currencyId === 2)
// const discountRmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const r = this.form.receiptAccountList.find(v => v.currencyId == 2)
// r && (r.discountTotal = discountRmb)
// const nairaList = this.list.filter(v => v.currencyId === 3)
// const discountNaira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// const n = this.form.receiptAccountList.find(v => v.currencyId == 3)
// n && (n.discountTotal = discountNaira)
this.form.receiptAccountList.forEach((item, index) => {
this.rateChange(item, index)
});
this.calculation()
})
})
},
getReceivableInfo(){
getReceivableInfoByIds({ id: this.receiptId }).then(res => {
this.list = [{...res.data}]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
this.calculation()
getOrder(res.data.orderId).then(response => {
// console.log(response.data)
if(response.data.customerId) this.$set(this.form,'customerId',response.data.customerId)
})
})
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
......@@ -1414,6 +1427,7 @@ export default {
const list = [...this.list]
delete list[index]
this.list = list.filter(v => v)
this.calculation()
},
/** 搜索按钮操作 */
handleQuery() {
......
......@@ -679,8 +679,10 @@ export default {
}
// total = NP.plus(total, item.writeOffAmount)
})
console.log(total);
let portion = NP.divide(total,amountTotal)
console.log(portion);
if(!portion) return 0
return (portion*100).toFixed(2)
}
},
......
......@@ -46,35 +46,48 @@
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</template>
</el-table-column>
<el-table-column :label="$t('体积')">
<el-table-column :label="$t('入仓体积')">
<template slot-scope="{row}">{{row.volume}}</template>
</el-table-column>
<el-table-column :label="$t('重量')">
<el-table-column :label="$t('收费体积')">
<template slot-scope="{row}">{{row.chargeVolume}}</template>
</el-table-column>
<el-table-column :label="$t('入仓重量')">
<template slot-scope="{row}">{{row.weight}}kg</template>
</el-table-column>
<el-table-column :label="$t('收费重量')">
<template slot-scope="{row}">{{row.chargeWeight}}kg</template>
</el-table-column>
<el-table-column :label="$t('箱数')">
<template slot-scope="{row}">{{row.num}}</template>
<template slot-scope="{row}">
<el-button type="text" @click="showWarehouseRecord(row)">{{row.num}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('数量')">
<template slot-scope="{row}">{{row.quantity}}</template>
</el-table-column>
</el-table>
</template>
<warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body></warehouse-record>
</div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getBoxApproval} from '@/api/ecw/box'
import {getChannel} from '@/api/ecw/channel'
import WarehouseRecord from "@/views/ecw/order/splitApply/components/WarehouseRecord";
export default {
props:{
components: {WarehouseRecord},
props:{
id: [String, Number]
},
data(){
return {
detail: null,
order: null,
channel: null
channel: null,
// 查看入仓记录的条目
currentWarehouseRecord: null
}
},
watch:{
......@@ -110,6 +123,12 @@ export default {
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
},
showWarehouseRecord(row){
if(!row.specsRecordVOList){
return this.$message.info(this.$t('暂无入仓记录'))
}
this.currentWarehouseRecord = row.specsRecordVOList
}
}
}
......@@ -122,4 +141,4 @@ export default {
font-weight: bold;
}
}
</style>
\ No newline at end of file
</style>
......@@ -46,31 +46,42 @@
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('体积')">
<template slot-scope="{row}">{{row.volume}}</template>
</el-table-column>
<el-table-column :label="$t('重量')">
<template slot-scope="{row}">{{row.weight}}kg</template>
</el-table-column>
<el-table-column :label="$t('箱数')">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
<el-table-column :label="$t('入仓体积')">
<template slot-scope="{row}">{{row.volume}}</template>
</el-table-column>
<el-table-column :label="$t('收费体积')">
<template slot-scope="{row}">{{row.chargeVolume}}</template>
</el-table-column>
<el-table-column :label="$t('入仓重量')">
<template slot-scope="{row}">{{row.weight}}kg</template>
</el-table-column>
<el-table-column :label="$t('收费重量')">
<template slot-scope="{row}">{{row.chargeWeight}}kg</template>
</el-table-column>
<el-table-column :label="$t('箱数')">
<template slot-scope="{row}">
<el-button type="text" @click="showWarehouseRecord(row)">{{row.num}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('数量')">
<template slot-scope="{row}">{{row.quantity}}</template>
</el-table-column>
</el-table-column>
<el-table-column :label="$t('备注')">
<template slot-scope="{row}">{{row.remark}}</template>
</el-table-column>
</el-table-column>
</el-table>
</template>
<warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body></warehouse-record>
</div>
</template>
<script>
import {getApproval, getOrder} from '@/api/ecw/order'
import {getChannel} from '@/api/ecw/channel'
import {getSplitList} from '@/api/ecw/orderHandle'
import WarehouseRecord from "@/views/ecw/order/splitApply/components/WarehouseRecord";
export default {
props:{
components: {WarehouseRecord},
props:{
id: [String, Number]
},
data(){
......@@ -78,7 +89,9 @@ export default {
detail: null,
order: null,
channel: null,
orderSplitBackVOList: []
orderSplitBackVOList: [],
// 查看入仓记录的条目
currentWarehouseRecord: null
}
},
watch:{
......@@ -121,7 +134,13 @@ export default {
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
},
showWarehouseRecord(row){
if(!row.specsRecordVOList){
return this.$message.info(this.$t('暂无入仓记录'))
}
this.currentWarehouseRecord = row.specsRecordVOList
}
}
}
</script>
......@@ -133,4 +152,4 @@ export default {
font-weight: bold;
}
}
</style>
\ No newline at end of file
</style>
<template>
<!-- 拆单入仓记录 -->
<el-dialog :title="$t('入仓记录')" :visible="show" :before-close="closeDialog" :close-on-click-modal="false" width="1000px" :append-to-body="appendToBody">
<el-table :data="list">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="num" />
<el-table-column :label="$t('入仓类型')" prop="specificationType">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[0]}}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[1]}}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[2]}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<!--<el-table-column :label="$t('入仓快递单号')" prop="expressNo" />-->
<!--<el-table-column :label="$t('首次入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>-->
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
{{getLocationName(row.orderLocationBackVOList)}}
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
export default {
name: "WarehouseRecord",
props:{
list:{
type: Array,
default: []
},
appendToBody: Boolean
},
data(){
return {
show: false
}
},
mounted() {
this.show = true
},
methods:{
// 获取储位名称
getLocationName(locationArr){
if(!locationArr || !locationArr.length) return ''
let arr = []
locationArr.forEach(item => {
arr.push(`${item.areaName}${item.locationName || ''}`)
})
return Array.from(new Set(arr)).join(",")
},
closeDialog(){
this.show = false
this.$emit('close');
},
}
}
</script>
<style scoped>
</style>
......@@ -943,10 +943,11 @@ export default {
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
// 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
// 上面弄错了,默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3484.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/
}
form.table.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
......
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