Commit ea447df0 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 533ed54b d272ef4b
......@@ -181,6 +181,7 @@ export const DICT_TYPE = {
MANUAL_EXCEPTION_TYPE:'manual_exception_type',
APPLY_STATUS:'apply_status',//特价申请审核状态
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
ECW_AUTH_TYPE:'auth_type',//品牌授权
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type',
......
......@@ -33,7 +33,11 @@ export default {
},
created() {
const { currNode, shipmentObj } = this.$attrs;
const { preInstallBackInfo, cabinetUnloadBackApprovalInfo } = shipmentObj;
const {
preInstallBackInfo,
cabinetBackInfo,
cabinetUnloadBackApprovalInfo,
} = shipmentObj;
if (currNode.type === "preinstall") {
this.isReview = preInstallBackInfo ? true : false;
if (preInstallBackInfo && preInstallBackInfo.approvalStatus !== 1) {
......@@ -41,9 +45,19 @@ export default {
}
this.bpmProcessId = preInstallBackInfo?.bpmProcessId;
}
if (currNode.type === "cabinet") {
this.isReview = cabinetBackInfo ? true : false;
if (cabinetBackInfo && cabinetBackInfo.approvalStatus !== 1) {
this.isReview = false;
}
this.bpmProcessId = cabinetBackInfo?.bpmProcessId;
}
if (currNode.type === "unloading") {
this.isReview = cabinetUnloadBackApprovalInfo ? true : false;
if (cabinetUnloadBackApprovalInfo && cabinetUnloadBackApprovalInfo.approvalStatus !== 1) {
if (
cabinetUnloadBackApprovalInfo &&
cabinetUnloadBackApprovalInfo.approvalStatus !== 1
) {
this.isReview = false;
}
this.bpmProcessId = cabinetUnloadBackApprovalInfo?.bpmProcessId;
......@@ -59,11 +73,15 @@ export default {
this.$refs["reviewForm"].validate((valid) => {
if (valid) {
const { currNode, shipmentObj } = this.$attrs;
let approvalType = 4; // 预装反审
if (currNode.type === "cabinet") approvalType = 9; // 装柜反审
if (currNode.type === "unloading") approvalType = 7; // 卸柜反审核
approvalCreate({
shipmentId: shipmentObj.id,
...this.reviewObj,
approvalStatus: 0,
approvalType: currNode.type === "preinstall" ? 4 : 7, // 4预装反审 7卸柜反审核
approvalType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
......
......@@ -80,12 +80,12 @@ export default {
seaBaseData: Array,
width: {
type: String,
default: '76px'
default: "76px",
},
height: {
type: String,
default: '76px'
}
default: "76px",
},
},
data() {
return {
......@@ -169,6 +169,16 @@ export default {
this.$set(this.dialogConfig, "fullscreen", true);
this.$set(this.dialogConfig, "title", this.$t("出货安排(预装)"));
}
// 装柜
case "cabinet":
// 装柜反审
const cabStatus = this.shipmentObj[node.keyName];
if ([47].includes(cabStatus)) {
this.currentComponent = `reviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", this.$t("装柜反审"));
}
break;
// 卸柜
case "unloading":
// 卸柜反审
......
......@@ -197,7 +197,7 @@
</el-table-column>
<el-table-column :label="$t('价税合计(RMB)')" align="center" prop="total" >
<template slot-scope="scope">
<span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(6) }}</span>
<span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(2) }}</span>
<!-- <span>{{scope.row.total}}</span> -->
</template>
</el-table-column>
......
......@@ -124,8 +124,8 @@
<!-- <el-table-column label="应收金额" align="center" prop="receivableAmount" /> -->
<el-table-column :label="$t('应收金额')" align="center" prop="receivableAmount">
<template slot-scope="scope" v-if="scope.row.type !== 'total'">
<span v-if="scope.row.discountTotal>0">{{ `${scope.row.receivableAmount - scope.row.discountTotal }(${scope.row.receivableAmount} - ${scope.row.discountTotal})` }}</span>
<span v-else>{{ `${scope.row.receivableAmount - scope.row.discountTotal }` }}</span>
<span v-if="scope.row.discountTotal&&scope.row.discountTotal>0">{{ `${scope.row.receivableAmount - scope.row.discountTotal }(${scope.row.receivableAmount} - ${scope.row.discountTotal})` }}</span>
<span v-else>{{ `${scope.row.receivableAmount}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" width="220">
......@@ -510,7 +510,7 @@ export default {
this.detailed.forEach(item => {
total = NP.plus(total, item.writeOffAmount)
})
return total.toFixed(6)
return total.toFixed(2)
},
WriteOffProportion(){
let total = 0
......@@ -618,8 +618,13 @@ export default {
}
var dollarList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(6)
amountList.push({currencyName:item.titleZh,amount:dollar})
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
if(n.discountTotal&&n.discountTotal>0){
amountList.push({currencyName:item.titleZh,amount:(dollar-n.discountTotal).toFixed(2)})
}else{
amountList.push({currencyName:item.titleZh,amount:dollar})
}
}
})
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = amountList
......@@ -639,7 +644,7 @@ export default {
methods: {
rateChange(row, index) {
console.log(row)
row.receivableAmount && (row.collectionAmount = NP.times(row.collectionRate || 0, NP.minus(row.receivableAmount, row.discountTotal||0)).toFixed(6))
row.receivableAmount && (row.collectionAmount = NP.times(row.collectionRate || 0, NP.minus(row.receivableAmount, row.discountTotal||0)).toFixed(2))
this.form.receiptAccountList[index] = {...row}
},
setWriteOffAmount() {
......@@ -651,13 +656,35 @@ export default {
return ''
},
calculation() {
const verificationList = this.detailed.filter(v => v.status === 1)
const dollarList = verificationList.filter(v => v.currencyId === 1)
const dollar = dollarList.length > 0 ? dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
const rmbList = verificationList.filter(v => v.currencyId === 3)
const rmb = rmbList.length > 0 ? rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
const nairaList = verificationList.filter(v => v.currencyId === 2)
const naira = nairaList.length > 0 ? nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
// this.currencyList.forEach((item,index)=>{
// var verificationList = this.detailed.filter(v => v.status === 1)
// var dollarList = verificationList.filter(v => v.currencyId === item.id)
// if(dollarList.length>0){
// let dollar,discountDollar
// dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
// discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
// var t = copyList.find(v => v.currencyId == item.id)
// this.form.receiptAccountList.push(
// {
// discountTotal: discountDollar,
// currencyId: item.id,
// receivableAmount: dollar,
// writeOffRate: t?.writeOffRate || NP.divide(this.currencyList.find(v => v.id === item.id).huilv, this.currencyList.find(v => v.id === this.showCurrencyId).huilv).toFixed(6),
// platformAccountId: t?.platformAccountId || '',
// collectionCurrencyId: t?.collectionCurrencyId || item.id,
// collectionRate: t?.collectionRate || 1
// }
// )
// this.calculationCount(NP.minus(dollar, discountDollar), item.id)
// }
// })
// const verificationList = this.detailed.filter(v => v.status === 1)
// const dollarList = verificationList.filter(v => v.currencyId === 1)
// const dollar = dollarList.length > 0 ? dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
// const rmbList = verificationList.filter(v => v.currencyId === 3)
// const rmb = rmbList.length > 0 ? rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
// const nairaList = verificationList.filter(v => v.currencyId === 2)
// const naira = nairaList.length > 0 ? nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.amount || 0), 0) : 0
// const usCount = NP.plus(dollar, NP.times(this.RMBtoUS(), rmb), NP.times(this.NANtoUS(), naira))
// const rmbCount = NP.plus(rmb, NP.times(this.UStoRMB(), dollar), NP.times(this.NANtoRMB(), naira))
......@@ -666,41 +693,41 @@ export default {
// this.verificationData.usCount = usCount
// this.verificationData.rmbCount = rmbCount
// this.verificationData.nairaCount = nairaCount
this.verificationData.usCount = dollar
this.verificationData.rmbCount = rmb
this.verificationData.nairaCount = naira
// this.verificationData.usCount = dollar
// this.verificationData.rmbCount = rmb
// this.verificationData.nairaCount = naira
if (verificationList.indexOf(1)>-1) { // 美元
this.verificationData.writtenOff = dollar
this.verificationData.WriteOffProportion = NP.times(NP.divide(dollar, this.form.receivableTotalAmount), 100)
const remaining = NP.minus(this.form.receivableTotalAmount, dollar)
// if (verificationList.indexOf(1)>-1) { // 美元
// this.verificationData.writtenOff = dollar
// this.verificationData.WriteOffProportion = NP.times(NP.divide(dollar, this.form.receivableTotalAmount), 100)
// const remaining = NP.minus(this.form.receivableTotalAmount, dollar)
// this.remainingAmount = {
// usAmount: remaining,
// rmbAmount: NP.times(this.UStoRMB(), remaining),
// nairaAmount: NP.times(this.UStoNAN(), remaining)
// }
this.remainingAmount.usAmount = remaining
} else if (this.showCurrencyId === 2) { // 人民币
this.verificationData.writtenOff = rmb
this.verificationData.WriteOffProportion = NP.times(NP.divide(rmb, this.form.receivableTotalAmount), 100)
const remaining = NP.minus(this.form.receivableTotalAmount, rmb)
// this.remainingAmount.usAmount = remaining
// } else if (this.showCurrencyId === 2) { // 人民币
// this.verificationData.writtenOff = rmb
// this.verificationData.WriteOffProportion = NP.times(NP.divide(rmb, this.form.receivableTotalAmount), 100)
// const remaining = NP.minus(this.form.receivableTotalAmount, rmb)
// this.remainingAmount = {
// usAmount: NP.times(this.RMBtoUS(), remaining),
// rmbAmount: remaining,
// nairaAmount: NP.times(this.RMBtoNAN(), remaining)
// }
this.remainingAmount.rmbAmount = remaining
} else if (this.showCurrencyId === 3) { // 奈拉
this.verificationData.writtenOff = naira
this.verificationData.WriteOffProportion = NP.times(NP.divide(naira, this.form.receivableTotalAmount), 100)
const remaining = NP.minus(this.form.receivableTotalAmount, naira)
// this.remainingAmount.rmbAmount = remaining
// } else if (this.showCurrencyId === 3) { // 奈拉
// this.verificationData.writtenOff = naira
// this.verificationData.WriteOffProportion = NP.times(NP.divide(naira, this.form.receivableTotalAmount), 100)
// const remaining = NP.minus(this.form.receivableTotalAmount, naira)
// this.remainingAmount = {
// usAmount: NP.times(this.NANtoUS(), remaining),
// rmbAmount: NP.times(this.NANtoRMB(), remaining),
// nairaAmount: remaining
// }
this.remainingAmount.nairaAmount = remaining
}
// this.remainingAmount.nairaAmount = remaining
// }
},
accountChange(val){
var data = this.bankData.find(item=>item.id==val)
......@@ -751,7 +778,7 @@ export default {
rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
}))
this.calculation()
// this.calculation()
})
},
saveFrom() {
......
......@@ -26,10 +26,14 @@
<el-table-column :label="$t('唛头')" prop="marks"></el-table-column>
<el-table-column :label="$t('货物数据')">
<template v-slot="{row}">
<div v-if="row.costVO">
<div v-if="row.costVO && row.status !== 5">
箱数:{{row.costVO.totalNum}}
{{row.costVO.totalVolume}}
{{row.costVO.totalWeight}}kg
</div> <div v-else>
箱数:{{row.sumQuantity}}
{{row.sumVolume}}
{{row.sumWeight}}kg
</div>
</template>
</el-table-column>
......@@ -41,6 +45,7 @@
<el-table-column :label="$t('状态')">
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS"></dict-tag>
{{scope.row.status}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
......
......@@ -52,7 +52,7 @@
<el-descriptions-item :label="$t('出货渠道')" :span="2">{{channelName}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<el-descriptions class="mr-10" border :title="$t('基础信息')" :column="2">
<el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
......@@ -148,7 +148,7 @@
</el-table-column>
<el-table-column prop="warehouseInInfoVO.quantityAll" :label="$t('数量') + '(个)'" width="90px">
<template slot-scope="{row}">
{{order.inWarehouseState > 1 ? row.warehouseInInfoVO.quantityAll : row.quantity}}
{{(order.inWarehouseState > 1 && row.warehouseInInfoVO) ? row.warehouseInInfoVO.quantityAll : row.quantity}}
</template>
</el-table-column>
<el-table-column prop="" :label="$t('费用类型')">
......
......@@ -57,7 +57,7 @@
</el-descriptions-item>
</el-descriptions>
<el-form-item label="材质" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material"></dict-selector>
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
<el-form-item label="入仓时间" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" placeholder="请选择入仓时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
......
......@@ -67,9 +67,15 @@
prop="diffType"
v-slot="{row}"
:label="$t('状态')">
<dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{green: row.warehouseInInfoVO.diffType === 4}"/>
<span class="red" v-else-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
<dict-tag
v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType"
:type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS"
:value="row.warehouseInInfoVO.diffType"
class="red"
:class="{green: row.warehouseInInfoVO.diffType === 4}"
/>
<span :class="{red: row.itemStatus === 3}" v-else>{{ row.itemStatus === 3 ? ($t('少了') + row.num + $t('箱')) : $t('待入仓') }}</span>
<span class="red" v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
</el-table-column>
<el-table-column
prop="address"
......
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