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

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

parents 51416852 a45f0db6
...@@ -50,7 +50,12 @@ export default { ...@@ -50,7 +50,12 @@ export default {
padding: 50px; padding: 50px;
text-align: center; 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){ @for $i from 1 through length($sizes){
$item: nth($sizes, $i); $item: nth($sizes, $i);
.ml-#{$item}{ .ml-#{$item}{
......
...@@ -5,7 +5,7 @@ export function listOperateLog(query) { ...@@ -5,7 +5,7 @@ export function listOperateLog(query) {
return request({ return request({
url: '/system/operate-log/page', url: '/system/operate-log/page',
method: 'get', method: 'get',
timeout: 5*6000, timeout: 5*60000,
params: query params: query
}) })
} }
...@@ -16,7 +16,7 @@ export function exportOperateLog(query) { ...@@ -16,7 +16,7 @@ export function exportOperateLog(query) {
url: '/system/operate-log/export', url: '/system/operate-log/export',
method: 'get', method: 'get',
params: query, params: query,
timeout: 5*6000, timeout: 5*60000,
responseType: 'blob' responseType: 'blob'
}) })
} }
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
/* doc.save("a4.pdf"); /* doc.save("a4.pdf");
return Promise.reject() */ return Promise.reject() */
let form = new FormData() 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('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'}))
form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/ form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/
......
...@@ -785,7 +785,7 @@ export default { ...@@ -785,7 +785,7 @@ export default {
}, },
/* 获取参数 */ /* 获取参数 */
getParams() { getParams() {
const { rucangtime = [] } = this.queryParams; let rucangtime = this.queryParams.rucangtime?this.queryParams.rucangtime:[]
return { return {
...this.queryParams, ...this.queryParams,
...this.$attrs.params, ...this.$attrs.params,
......
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span> <span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<div v-else> <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[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[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> --> <div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> -->
...@@ -746,8 +746,16 @@ export default { ...@@ -746,8 +746,16 @@ export default {
}; };
}, },
activated(){ activated(){
console.log(11) if (this.$route.query.id) {
// this.getList(); 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() { async created() {
getUserProfile().then(res => { getUserProfile().then(res => {
...@@ -775,69 +783,11 @@ export default { ...@@ -775,69 +783,11 @@ export default {
if (that.$route.query.id) { if (that.$route.query.id) {
this.flag = true this.flag = true
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log(this.id) this.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)
})
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()
})
})
} }
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;
getReceivableInfoByIds({ id: this.receiptId }).then(res => { this.getReceivableInfo()
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.getList(); // this.getList();
...@@ -904,6 +854,69 @@ export default { ...@@ -904,6 +854,69 @@ export default {
} }
}, },
methods: { 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){ getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == 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 if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
...@@ -1414,6 +1427,7 @@ export default { ...@@ -1414,6 +1427,7 @@ export default {
const list = [...this.list] const list = [...this.list]
delete list[index] delete list[index]
this.list = list.filter(v => v) this.list = list.filter(v => v)
this.calculation()
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
......
...@@ -679,8 +679,10 @@ export default { ...@@ -679,8 +679,10 @@ export default {
} }
// total = NP.plus(total, item.writeOffAmount) // total = NP.plus(total, item.writeOffAmount)
}) })
console.log(total);
let portion = NP.divide(total,amountTotal) let portion = NP.divide(total,amountTotal)
console.log(portion);
if(!portion) return 0
return (portion*100).toFixed(2) return (portion*100).toFixed(2)
} }
}, },
......
...@@ -46,27 +46,38 @@ ...@@ -46,27 +46,38 @@
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /> <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('体积')"> <el-table-column :label="$t('入仓体积')">
<template slot-scope="{row}">{{row.volume}}</template> <template slot-scope="{row}">{{row.volume}}</template>
</el-table-column> </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> <template slot-scope="{row}">{{row.weight}}kg</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收费重量')">
<template slot-scope="{row}">{{row.chargeWeight}}kg</template>
</el-table-column>
<el-table-column :label="$t('箱数')"> <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>
<el-table-column :label="$t('数量')"> <el-table-column :label="$t('数量')">
<template slot-scope="{row}">{{row.quantity}}</template> <template slot-scope="{row}">{{row.quantity}}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
<warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body></warehouse-record>
</div> </div>
</template> </template>
<script> <script>
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import {getBoxApproval} from '@/api/ecw/box' import {getBoxApproval} from '@/api/ecw/box'
import {getChannel} from '@/api/ecw/channel' import {getChannel} from '@/api/ecw/channel'
import WarehouseRecord from "@/views/ecw/order/splitApply/components/WarehouseRecord";
export default { export default {
components: {WarehouseRecord},
props:{ props:{
id: [String, Number] id: [String, Number]
}, },
...@@ -74,7 +85,9 @@ export default { ...@@ -74,7 +85,9 @@ export default {
return { return {
detail: null, detail: null,
order: null, order: null,
channel: null channel: null,
// 查看入仓记录的条目
currentWarehouseRecord: null
} }
}, },
watch:{ watch:{
...@@ -110,6 +123,12 @@ export default { ...@@ -110,6 +123,12 @@ export default {
getChannel(this.order.channelId).then(res => { getChannel(this.order.channelId).then(res => {
this.channel = res.data this.channel = res.data
}) })
},
showWarehouseRecord(row){
if(!row.specsRecordVOList){
return this.$message.info(this.$t('暂无入仓记录'))
}
this.currentWarehouseRecord = row.specsRecordVOList
} }
} }
} }
......
...@@ -46,14 +46,22 @@ ...@@ -46,14 +46,22 @@
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" /> <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('体积')"> <el-table-column :label="$t('入仓体积')">
<template slot-scope="{row}">{{row.volume}}</template> <template slot-scope="{row}">{{row.volume}}</template>
</el-table-column> </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> <template slot-scope="{row}">{{row.weight}}kg</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收费重量')">
<template slot-scope="{row}">{{row.chargeWeight}}kg</template>
</el-table-column>
<el-table-column :label="$t('箱数')"> <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>
<el-table-column :label="$t('数量')"> <el-table-column :label="$t('数量')">
<template slot-scope="{row}">{{row.quantity}}</template> <template slot-scope="{row}">{{row.quantity}}</template>
...@@ -63,13 +71,16 @@ ...@@ -63,13 +71,16 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
<warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body></warehouse-record>
</div> </div>
</template> </template>
<script> <script>
import {getApproval, getOrder} from '@/api/ecw/order' import {getApproval, getOrder} from '@/api/ecw/order'
import {getChannel} from '@/api/ecw/channel' import {getChannel} from '@/api/ecw/channel'
import {getSplitList} from '@/api/ecw/orderHandle' import {getSplitList} from '@/api/ecw/orderHandle'
import WarehouseRecord from "@/views/ecw/order/splitApply/components/WarehouseRecord";
export default { export default {
components: {WarehouseRecord},
props:{ props:{
id: [String, Number] id: [String, Number]
}, },
...@@ -78,7 +89,9 @@ export default { ...@@ -78,7 +89,9 @@ export default {
detail: null, detail: null,
order: null, order: null,
channel: null, channel: null,
orderSplitBackVOList: [] orderSplitBackVOList: [],
// 查看入仓记录的条目
currentWarehouseRecord: null
} }
}, },
watch:{ watch:{
...@@ -121,6 +134,12 @@ export default { ...@@ -121,6 +134,12 @@ export default {
getChannel(this.order.channelId).then(res => { getChannel(this.order.channelId).then(res => {
this.channel = res.data this.channel = res.data
}) })
},
showWarehouseRecord(row){
if(!row.specsRecordVOList){
return this.$message.info(this.$t('暂无入仓记录'))
}
this.currentWarehouseRecord = row.specsRecordVOList
} }
} }
} }
......
<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 { ...@@ -943,10 +943,11 @@ export default {
const form = val === 1 ? this.form1 : this.form const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length const formLength = form.table.length
let orderLocationBackVOList = [] 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) { if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList)) orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/ }
form.table.push({ form.table.push({
"boxGauge1": this.isJiyun ? 0 : '', "boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": 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