Commit 2684caf5 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 80af23c5 3a062817
......@@ -27,7 +27,7 @@
{{getCabinetLabel(shipmentObj.cabinetId)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">
{{getBoxStatus(shipmentObj)}}
{{shipmentObj.shipmentStatusText}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总计')">
{{getBoxSum(shipmentObj.boxStatistics)}}
......
......@@ -14,7 +14,7 @@
<!-- <el-descriptions-item > -->
<el-form-item
:label="$t('客户')"
style="margin-bottom: 0"
style="margin-bottom: 0;margin-top: 20px;"
prop="customerId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('客户不能为空') }"
......@@ -28,7 +28,7 @@
<el-descriptions-item > -->
<el-form-item
:label="$t('部门')"
style="margin-bottom: 0"
style="margin-bottom: 0;margin-top: 20px;"
prop="departmentId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('部门不能为空') }"
......@@ -48,7 +48,7 @@
</el-form-item>
<el-form-item
:label="$t('业务员')"
style="margin-bottom: 0"
style="margin-bottom: 0;margin-top: 20px;"
prop="salesmanId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('业务员不能为空') }"
......@@ -718,7 +718,7 @@ export default {
discountForm: {},
selectListRow: {},
selectListIndex: 0,
flag: false
flag: false,
};
},
async created() {
......@@ -908,8 +908,8 @@ export default {
receivableAmount: dollar,
writeOffRate: t?.writeOffRate || (this.showCurrencyId === 1 ? 1 : this.showCurrencyId === 2 ? this.UStoRMB() : this.UStoNAN()),
platformAccountId: t?.platformAccountId || '',
collectionCurrencyId: t?.collectionCurrencyId || '',
collectionRate: t?.collectionRate || ''
collectionCurrencyId: t?.collectionCurrencyId || 1,
collectionRate: t?.collectionRate || 1
}
]
this.calculationCount(NP.minus(dollar, discountDollar), 1)
......@@ -949,7 +949,8 @@ export default {
writeOffRate: t?.writeOffRate || (this.showCurrencyId === 1 ? this.NANtoUS() : this.showCurrencyId === 2 ? this.NANtoRMB() : 1),
platformAccountId: t?.platformAccountId || '',
collectionCurrencyId: t?.collectionCurrencyId || '',
collectionRate: t?.collectionRate || ''
collectionRate: t?.collectionRate || '',
collectionAmount:discountNaira
}
]
this.calculationCount(NP.minus(naira, discountNaira), 3)
......@@ -960,7 +961,7 @@ export default {
this.form.receiptAccountList = [...this.form.receiptAccountList, {
type: 'total',
writeOffAmount: totalt,
collectionAmount: [0, 0, 0]
collectionAmount: [this.form.receiptAccountList.discountNaira, 0, 0]
}]
this.form.receivableTotalAmount = totalt
......@@ -1132,16 +1133,32 @@ export default {
if (this.list && this.list.length > 0) {
params.receivableVOList = this.list
}else{
this.saveBtnLoading = false
this.$modal.msgError(this.$t('请添加未收客户款项'));
return
}
// params.receiptAccountList.length = params.receiptAccountList.length - 1
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
var saveStatus = true
params.receiptAccountList.map(v => {
if(!v.platformAccountId){
saveStatus = false
}
var bankname = this.bankData.filter(item=>item.id == v.platformAccountId)
if(bankname.length>0){
v.platformAccountName = bankname[0].baAccountName
v.platformAccountNo = bankname[0].baAccountNum
v.platformAccountBlankName = bankname[0].baBankName
}
delete v.discountTotal
v.writeOffRate = Number(v.writeOffRate)
return v
})
if(!saveStatus){
this.$modal.msgError(this.$t('请添加收款账户'));
return
}
delete params.receivableDetail
......@@ -1161,8 +1178,6 @@ export default {
});
if (valid) {
this.saveBtnLoading = true
console.log(this.id)
return
if (this.id && this.id != 0) {
updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功'));
......
......@@ -9,15 +9,18 @@
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('申请日期') }}</div> <span>{{ form.applicationAt || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('结算方式') }}</div><span>{{ form.settlementType || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('结算方式') }}</div><span> <dict-tag
:type="DICT_TYPE.CUSTOMER_BALANCE"
v-model="form.settlementType"
/></span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('付款公司') }}</div><span>{{ form.supplierName || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行户名') }}</div><span>{{ findBank(form.supplierBankAccount).baAccountName || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行户名') }}</div><span>{{ form.supplierBankAccountName || '-' }}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行名称') }}</div><span>{{ findBank(form.supplierBankAccount).baBankName || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行账号') }}</div><span>{{ findBank(form.supplierBankAccount).baAccountNum || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行名称') }}</div><span>{{ form.supplierBank|| '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行账号') }}</div><span>{{ form.supplierBankAccount || '-' }}</span></div>
</div>
<!-- <div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;">水单号:</div><span>{{form?form.accountBank:''}}</span></div>
......@@ -174,6 +177,7 @@
},
findBank(val) {
const t = this.bankData.find(v => v.id == val)
console.log(t)
return t || {}
},
totalMoney() {
......@@ -205,7 +209,7 @@
var chineseStr = '';
//分离金额后用的数组,预定义
var parts;
// 传入的参数为空情况
// 传入的参数为空情况
if(money === '') {
return '';
}
......@@ -213,7 +217,7 @@
if(money >= maxNum){
return ''
}
// 传入的参数为0情况
// 传入的参数为0情况
if (money === 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr
......@@ -248,7 +252,7 @@
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
}
if(m == 0 && zeroCount < 4){
chineseStr += cnIntUnits[q];
chineseStr += cnIntUnits[q];
}
}
// 最后+ 元
......
......@@ -193,7 +193,11 @@
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" />
<el-table-column :label="$t('体积/重量')" align="center" prop="weight" />
<el-table-column :label="$t('体积/重量')" align="center" prop="weight" >
<template slot-scope="scope">
{{ scope.row.volume}}/ {{ scope.row.weight}}
</template>
</el-table-column>
<el-table-column :label="$t('发货人')" align="center" prop="consignorName" />
<el-table-column :label="$t('收货人')" align="center" prop="consigneeName" />
<el-table-column :label="$t('订单状态')" align="center" prop="status">
......
<template>
<div>
<el-dialog
......@@ -9,12 +8,12 @@
v-bind="$attrs"
>
<el-tabs v-model="activeName" type="card" @tab-click="activeWarehouse = {}">
<el-tab-pane v-if="item.warehouseId === warehouseId" :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="item.id + index">
<el-tab-pane v-if="item.warehouseId === warehouseId" :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="index">
<div>
<div style="text-align: center">区域</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="warehouse.id + i">
<el-col :span="12" v-for="warehouse in item.children" :key="warehouse.id">
<div
class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
......@@ -29,14 +28,25 @@
<div>
<div style="text-align: center">仓位</div>
<div class="position-group">
<div class="position" v-for="(position ,index) in activeWarehouse.positionList" :key="item.id + index ">
<div
class="position-item"
v-for="item in position.children"
@click="handleSelectPosition(item)"
:class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
<div class="position" v-for="position in activeWarehouse.positionList" :key="position.id" @click="handleSelectPosition(position)">
<template v-if="position.children">
<div
class="position-item"
v-for="item in position.children"
:key="item.id"
@click.stop="handleSelectPositionChild(item)"
:class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
</template>
<template v-else>
<div
class="position-item"
:class="{'position-item-active': position.selected}">
{{ position.code }}
</div>
</template>
</div>
</div>
</div>
......@@ -57,7 +67,7 @@
import { getByWarehouseId } from '@/api/ecw/warehouseArea'
export default {
name: 'warehouseLocation',
name: 'WarehouseAreaDialog',
props: {
visible: {
type: Boolean,
......@@ -72,7 +82,7 @@ export default {
warehouseId: {
type: Number,
default: undefined
},
}
},
data() {
......@@ -83,7 +93,8 @@ export default {
activeName: '0',
selectedWarehouse: [],
selectedPosition: [],
activeWarehouse: {}
activeWarehouse: {},
activeWarehouseId: undefined
};
},
......@@ -92,16 +103,17 @@ export default {
if (val) {
this.opened = true
getByWarehouseId({cityId: this.cityId,}).then(r => {
if (this.area.length === 0) getByWarehouseId({cityId: this.cityId,warehouseId: this.warehouseId }).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children.forEach(f => {
e.children?.forEach(f => {
// 区域
f.selected = false
if(f.positionList) f.positionList.forEach(g => {
// 位置
if(g.children)g.children.forEach(k => {
g.selected = false
g.children?.forEach(k => {
// 子位置
k.selected = false
})
......@@ -131,18 +143,25 @@ export default {
this.activeWarehouse = warehouse
if (!!warehouse.selected) {
warehouse.selected = false
} else {
warehouse.selected = true
return
} else if(this.activeWarehouseId !== warehouse.id) {
this.activeWarehouseId = warehouse.id
console.log(this.inputValue.find(e => e.areaId === warehouse.id), warehouse.id)
if (this.inputValue.find(e => e.areaId === warehouse.id)){
return
}
}
warehouse.selected = true
// 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList.forEach(g => {
if(g.children)g.children.forEach(k => {
k.selected = false
})
// 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList?.forEach(g => {
g.selected = false
g.children?.forEach(k => {
k.selected = false
})
}
})
},
handleSelectPosition(position) {
handleSelectPositionChild(position) {
if (!!position.selected) {
position.selected = false
......@@ -151,9 +170,9 @@ export default {
if (!parentAre.selected) {
// 检查父区域下是否所有位置被反选
let hasSelected = false
parentAre.positionList.forEach(g => {
parentAre.positionList?.forEach(g => {
// 位置
g.children.forEach(k => {
g.children?.forEach(k => {
// 子位置
if (k.selected) hasSelected = true
})
......@@ -167,6 +186,17 @@ export default {
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
},
handleSelectPosition(position) {
if (!!position.selected) {
position.selected = false
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
}
},
......@@ -180,17 +210,17 @@ export default {
selected() {
const result = []
this.area.forEach(e => {
this.area?.forEach(e => {
// 仓库
e.children.forEach(f => {
e.children?.forEach(f => {
// 区域
if (f.selected) result.push(f.code)
else if(f.positionList) f.positionList.forEach(g => {
else f.positionList?.forEach(g => {
// 位置
if (g.selected) result.push(k.code)
if(g.children)g.children.forEach(k => {
if (g.selected) result.push(f.code + g.code)
else if(g.children) g.children?.forEach(k => {
// 子位置
if (k.selected) result.push(k.code)
if (k.selected) result.push(f.code + k.code)
})
})
})
......@@ -201,33 +231,35 @@ export default {
inputValue(){
const result = []
this.area.forEach(e => {
this.area?.forEach(e => {
// 仓库
e.children.forEach(f => {
e.children?.forEach(f => {
// 区域
if (f.selected) result.push({
orderId: this.orderId,
wareId: f.pid,
areaId: f.id
})
else if(f.positionList) f.positionList.forEach(g => {
// 位置
if (g.selected) result.push({
orderId: this.orderId,
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else if(g.children)g.children.forEach(k => {
// 子位置
if (k.selected) result.push({
else {
f.positionList?.forEach(g => {
// 位置
if (g.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else g.children?.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
})
})
})
}
})
})
......@@ -272,9 +304,10 @@ export default {
border: 1px #EFEFEF solid;
gap: 1px;
min-height: 64px;
flex-flow: wrap;
}
.position{
width: 20%;
width: calc(20% - 1px);
height: 64px;
display: flex;
flex-direction: column;
......
......@@ -130,7 +130,7 @@
</el-table-column>
<el-table-column :label="$t('状态')" align="center">
<template slot-scope="scope">
{{scope.row.abnormalState!=0?$t('异常'):$t('正常')}}
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status"></dict-tag>
</template>
</el-table-column>
</el-table>
......@@ -180,6 +180,7 @@ export default {
},
data() {
return {
DICT_TYPE,
checked:false,
orderData:{},
// 订单异常列表
......
......@@ -67,7 +67,7 @@
<el-descriptions style="margin-top: 20px" :column="4" border>
<el-descriptions-item :label="$t('集运仓库')">{{ warehouseDetails && warehouseDetails.warehouseOutName ? warehouseDetails.warehouseOutName : '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('储位')">
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} {{$t('区')}}</div> <div>{{item.code}}</div></div>
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}{{$t('仓')}}</div><div>{{item.warehouseName ? item.regionName :''}} {{$t('区')}}</div> <div>{{item.code}}</div></div>
</el-descriptions-item>
<el-descriptions-item v-if="type == 2" :label="$t('选择储位')">
<div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">{{$t('选择储位')}}</div>
......@@ -383,18 +383,17 @@ export default {
},
watch:{
'params.orderLocationCreateReqVOList'(val){
console.log(val,'123')
console.log(val,'val');
getByWarehouseId().then(r =>{
console.log(r,'仓库')
let obj = [];
val.forEach(item => {
r.data.forEach(itemm => {
if(item.wareId === itemm.id){
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
if(itemmm.positionList.length > 0){
if(itemmm.positionList && itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children.length > 0){
if(ic.children && ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
......@@ -412,7 +411,6 @@ export default {
}
})
})
console.log(obj,'obj')
this.storageSpaceList = obj;
})
}
......
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