Commit d66066bb authored by 我在何方's avatar 我在何方
parents 763c5060 fe2fb604
...@@ -49,11 +49,20 @@ export default { ...@@ -49,11 +49,20 @@ export default {
.items-center{ .items-center{
align-items: center; align-items: center;
} }
.flex-between{
display: flex;
justify-content: space-between;
}
.empty-placeholder{ .empty-placeholder{
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}{
......
...@@ -48,7 +48,9 @@ export function getCustomerPage(query) { ...@@ -48,7 +48,9 @@ export function getCustomerPage(query) {
return request({ return request({
url: '/ecw/customer/page', url: '/ecw/customer/page',
method: 'get', method: 'get',
params: query params: query,
timeout: 60000
}) })
} }
/** /**
......
...@@ -25,7 +25,8 @@ export function getCustomerPage(query) { ...@@ -25,7 +25,8 @@ export function getCustomerPage(query) {
return request({ return request({
url: '/ecw/indirect-customer/page', url: '/ecw/indirect-customer/page',
method: 'get', method: 'get',
params: query params: query,
timeout: 30000
}) })
} }
...@@ -53,4 +54,4 @@ export function deleteIndirectCustomer(id) { ...@@ -53,4 +54,4 @@ export function deleteIndirectCustomer(id) {
url: '/ecw/indirect-customer/delete?id=' + id, url: '/ecw/indirect-customer/delete?id=' + id,
method: 'delete' method: 'delete'
}) })
} }
\ No newline at end of file
...@@ -5,7 +5,9 @@ export function getApiAccessLogPage(query) { ...@@ -5,7 +5,9 @@ export function getApiAccessLogPage(query) {
return request({ return request({
url: '/infra/api-access-log/page', url: '/infra/api-access-log/page',
method: 'get', method: 'get',
timeout: 1000*60*3,
params: query params: query
}) })
} }
......
...@@ -13,6 +13,7 @@ export function getApiErrorLogPage(query) { ...@@ -13,6 +13,7 @@ export function getApiErrorLogPage(query) {
return request({ return request({
url: '/infra/api-error-log/page', url: '/infra/api-error-log/page',
method: 'get', method: 'get',
timeout: 1000*60*3,
params: query params: query
}) })
} }
......
...@@ -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'
}) })
} }
...@@ -52,6 +52,8 @@ export default { ...@@ -52,6 +52,8 @@ export default {
this.list.unshift(res.data) this.list.unshift(res.data)
this.index = 0 this.index = 0
}) })
}else{
this.index = index
} }
}, },
remoteMethod(keyword){ remoteMethod(keyword){
...@@ -61,6 +63,9 @@ export default { ...@@ -61,6 +63,9 @@ export default {
getCustomerSelect(params) getCustomerSelect(params)
.then(res => this.list = res.data.list) .then(res => this.list = res.data.list)
.finally(() => this.loading = false) .finally(() => this.loading = false)
},
reset(){
this.index=null
} }
} }
} }
......
...@@ -142,7 +142,8 @@ export default { ...@@ -142,7 +142,8 @@ export default {
if (f.selected) result.push({ if (f.selected) result.push({
orderId: this.orderId, orderId: this.orderId,
wareId: f.pid, wareId: f.pid,
areaId: f.id areaId: f.id,
locationName: f.code
}) })
else { else {
f.positionList?.forEach(g => { f.positionList?.forEach(g => {
...@@ -151,7 +152,8 @@ export default { ...@@ -151,7 +152,8 @@ export default {
orderId: this.orderId, orderId: this.orderId,
wareId: g.domainId, wareId: g.domainId,
areaId: g.areaId, areaId: g.areaId,
locationId: g.id locationId: g.id,
locationName: f.code + g.code
}) })
else g.children?.forEach(k => { else g.children?.forEach(k => {
// 子位置 // 子位置
...@@ -159,7 +161,8 @@ export default { ...@@ -159,7 +161,8 @@ export default {
orderId: this.orderId, orderId: this.orderId,
wareId: k.domainId, wareId: k.domainId,
areaId: k.areaId, areaId: k.areaId,
locationId: k.id locationId: k.id,
locationName: f.code + k.code
}) })
}) })
}) })
......
...@@ -3896,5 +3896,6 @@ ...@@ -3896,5 +3896,6 @@
"入仓方数": "", "入仓方数": "",
"收费方数": "", "收费方数": "",
"可放入重量": "", "可放入重量": "",
"可放入收费重量": "" "可放入收费重量": "",
"确定注销并退出系统吗?": "Are you sure to log out and exit the system?"
} }
...@@ -94,10 +94,14 @@ export default { ...@@ -94,10 +94,14 @@ export default {
} }
}, },
created() { created() {
// 未避免频繁内存溢出,减少请求记录感染,开发的时候不轮询消息
if(process.env.NODE_ENV != 'development'){
setInterval(() => {
this.updateMessage()
}, 10000)
}
this.updateMessage() this.updateMessage()
setInterval(() => {
this.updateMessage()
}, 10000)
}, },
components: { components: {
Breadcrumb, Breadcrumb,
...@@ -158,7 +162,7 @@ export default { ...@@ -158,7 +162,7 @@ export default {
saveLocale(value) saveLocale(value)
}, */ }, */
async logout() { async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$modal.confirm(this.$t('确定注销并退出系统吗?'), this.$t('提示')).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/'; location.href = '/';
}) })
......
...@@ -16,7 +16,7 @@ const service = axios.create({ ...@@ -16,7 +16,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分 // axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: (localStorage.VUE_APP_BASE_API || process.env.VUE_APP_BASE_API) + '/admin-api/', // 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/ baseURL: (localStorage.VUE_APP_BASE_API || process.env.VUE_APP_BASE_API) + '/admin-api/', // 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
// 超时 // 超时
timeout: 10000 timeout: 1000 * 30
}) })
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
......
...@@ -281,6 +281,11 @@ export default { ...@@ -281,6 +281,11 @@ export default {
component: "BoxSplitDetail", component: "BoxSplitDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
}, },
// 退场拆单,跟出货装柜拆单一样
exit_split: {
component: "BoxSplitDetail",
id: this.processInstance.businessKey,
},
merge_detail: { merge_detail: {
component: "MergeDetail", component: "MergeDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('流程编号')" prop="processId"> <el-form-item :label="$t('流程编号')" prop="instanceId">
<el-input v-model="queryParams.instanceId" :placeholder="$t('请输入流程编号')" clearable/> <el-input v-model="queryParams.instanceId" :placeholder="$t('请输入流程编号')" clearable/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('流程名称')" prop="processName"> <el-form-item :label="$t('流程名称')" prop="processName">
<el-input v-model="queryParams.processName" :placeholder="$t('请输入任务名称')" clearable/> <el-input v-model="queryParams.processName" :placeholder="$t('请输入任务名称')" clearable/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('流程分类')" prop="processName"> <el-form-item :label="$t('流程分类')" prop="categoryId">
<el-select v-model="queryParams.categoryId" :placeholder="$t('请选择流程分类')" clearable> <el-select v-model="queryParams.categoryId" :placeholder="$t('请选择流程分类')" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY)"
:key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/> :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
</el-row> </el-row>
<el-row style="margin-top: 5px"> <el-row style="margin-top: 5px">
<el-table border :data="pagList" max-height="600px"> <el-table border :data="pagList" max-height="600px">
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" /> <el-table-column align="center" :label="$t('序号')" width="50" type="index" />
<el-table-column :label="$t('箱号')" align="center" prop="pkgNum" /> <el-table-column :label="$t('箱号')" align="center" prop="pkgNum" />
<el-table-column :label="$t('尺寸')" width="250px" align="center"> <el-table-column :label="$t('尺寸')" align="center">
<template slot-scope="scope"> {{ scope.row.pkgLength }}*{{ scope.row.pkgWidth }}*{{ scope.row.pkgHight }} </template> <template slot-scope="scope"> {{ scope.row.pkgLength }}*{{ scope.row.pkgWidth }}*{{ scope.row.pkgHight }} </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('订单数')" width="250px" align="center" prop="orderCount" /> <el-table-column :label="$t('订单数')" align="center" prop="orderCount" />
<el-table-column :label="$t('箱数')" width="250px" align="center" prop="sumCount" /> <el-table-column :label="$t('箱数')" align="center" prop="sumCount" />
<el-table-column :label="$t('入仓体积')" width="250px" align="center" prop="sumVolume" /> <el-table-column :label="$t('入仓体积')" align="center" prop="sumVolume" />
<el-table-column :label="$t('入仓重量')" align="center" prop="sumWeight" /> <el-table-column :label="$t('入仓重量')" align="center" prop="sumWeight" />
<el-table-column :label="$t('入仓数量(个)')" align="center" prop="sumQuantity" /> <el-table-column :label="$t('入仓数量(个)')" align="center" prop="sumQuantity" />
<el-table-column :label="$t('状态')" align="center" prop="tallyStatus"> <el-table-column :label="$t('状态')" align="center" prop="tallyStatus">
...@@ -49,12 +49,12 @@ ...@@ -49,12 +49,12 @@
{{ statusData[scope.row.status] }} {{ statusData[scope.row.status] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建时间')" align="center"> <el-table-column :label="$t('创建时间')" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatDate(scope.row.createTime, 'YYYY-MM-DD HH:mm:ss') }} {{ formatDate(scope.row.createTime, 'YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" width="260" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" width="260" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status == 1" type="text" size="small" @click="editMerge(scope.row)">{{ $t('编辑') }}</el-button> <el-button v-if="scope.row.status == 1" type="text" size="small" @click="editMerge(scope.row)">{{ $t('编辑') }}</el-button>
<el-button type="text" size="small" @click="pkgPage(scope.row)">{{ $t('装箱') }}</el-button> <el-button type="text" size="small" @click="pkgPage(scope.row)">{{ $t('装箱') }}</el-button>
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
</el-row> </el-row>
</el-row> </el-row>
<!-- 新增合包箱 --> <!-- 新增合包箱 -->
...@@ -76,18 +78,18 @@ ...@@ -76,18 +78,18 @@
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="$t('长')" prop="pkgLength"> <el-form-item :label="$t('长')" prop="pkgLength" :rules="[{ validator: validatorPositiveNumber, message: $t('格式错误'), trigger: 'blur'}]">
<el-input-number v-model="addMergeForm.pkgLength" :controls="false" :precision="2" style="width: 100px" /> <el-input v-model="addMergeForm.pkgLength" style="width: 100px" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="$t('宽')" prop="pkgWidth"> <el-form-item :label="$t('宽')" prop="pkgWidth" :rules="[{ validator: validatorPositiveNumber, message: $t('格式错误'), trigger: 'blur'}]">
<el-input-number v-model="addMergeForm.pkgWidth" :controls="false" :precision="2" style="width: 100px" /> <el-input v-model="addMergeForm.pkgWidth" style="width: 100px" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="$t('高')" prop="pkgHight"> <el-form-item :label="$t('高')" prop="pkgHight" :rules="[{ validator: validatorPositiveNumber, message: $t('格式错误'), trigger: 'blur'}]">
<el-input-number v-model="addMergeForm.pkgHight" :controls="false" :precision="2" style="width: 100px" /> <el-input v-model="addMergeForm.pkgHight" style="width: 100px" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -133,7 +135,16 @@ export default { ...@@ -133,7 +135,16 @@ export default {
printTag printTag
}, },
data() { data() {
let validatorPositiveNumber = (rule, value, callback) => {
if(!value || value == '')return callback();
if (!value) return callback(new Error('请输入数字'))
if (!Number(value)) return callback(new Error('请输入有效数字'))
let reg = /((^[1-9]\d*)|^0)(\.\d*){0,1}$/;
if (!reg.test(value)) return callback(new Error('请输入有效数字'));
callback();
}
return { return {
validatorPositiveNumber,
pagList: [], pagList: [],
statusData: ['', '未装箱', '装箱中', '已封箱'], statusData: ['', '未装箱', '装箱中', '已封箱'],
// 查询参数 // 查询参数
...@@ -142,6 +153,7 @@ export default { ...@@ -142,6 +153,7 @@ export default {
rows: 10, rows: 10,
shipmentId: this.$attrs.shipmentObj.id shipmentId: this.$attrs.shipmentObj.id
}, },
total: 0,
// 出货信息 // 出货信息
shipmentObj: this.$attrs.shipmentObj, shipmentObj: this.$attrs.shipmentObj,
addMergedialogVisible: false, addMergedialogVisible: false,
...@@ -173,6 +185,7 @@ export default { ...@@ -173,6 +185,7 @@ export default {
getList() { getList() {
getMergePkgList(this.queryParams).then((res) => { getMergePkgList(this.queryParams).then((res) => {
this.pagList = res.data.list this.pagList = res.data.list
this.total = res.data.total
}) })
}, },
editMerge(row) { editMerge(row) {
......
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
}, },
/** 节点点击 */ /** 节点点击 */
nodeClick(currIndex, node) { nodeClick(currIndex, node) {
if (!checkPermi(['box:'+node.type+':action'])) { if (!checkPermi(['boxAir:'+node.type+':action'])) {
this.$message.error(this.$t("没有此操作的权限")); this.$message.error(this.$t("没有此操作的权限"));
return; return;
} }
...@@ -240,6 +240,11 @@ export default { ...@@ -240,6 +240,11 @@ export default {
continue; continue;
} }
//合包非必须步骤
if (type === "mergePkg"){
++nodeIndex;
}
const { start, wait, end } = status; const { start, wait, end } = status;
if (start.includes(val[keyName])) { if (start.includes(val[keyName])) {
......
...@@ -279,6 +279,7 @@ export default { ...@@ -279,6 +279,7 @@ export default {
secId: this.partData.id, secId: this.partData.id,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
orderId: item.orderId, orderId: item.orderId,
isCover: 1
}; };
if (type === "all") { if (type === "all") {
params.orderItemIdList = item.boxOrderItemList.map( params.orderItemIdList = item.boxOrderItemList.map(
......
...@@ -563,14 +563,24 @@ export default { ...@@ -563,14 +563,24 @@ export default {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (column.property === "brandType") { if (column.property === "feeType") {
sums[index] = this.$t("合计"); sums[index] = this.$t("合计");
return; return;
} }
if (column.property === "num") { if (column.property === "warehouseInInfoVO.cartonsNum") {
sums[index] = new Decimal( var num = 0
this.calcSum(column.property, data) let values = data?.map((item) => Number(item.warehouseInInfoVO.cartonsNum)) ?? [];
).toNumber(); if (!values.every((value) => isNaN(value))) {
num = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
}
sums[index] = num
} }
if (column.property === "volumeWeight") { if (column.property === "volumeWeight") {
let volume = this.calcSum("volume", data); let volume = this.calcSum("volume", data);
...@@ -653,6 +663,7 @@ export default { ...@@ -653,6 +663,7 @@ export default {
orderItemIdList: item.boxOrderItemList.map( orderItemIdList: item.boxOrderItemList.map(
(data) => data.orderItemId (data) => data.orderItemId
), ),
isCover: 0
}; };
createGoods(params) createGoods(params)
...@@ -785,7 +796,7 @@ export default { ...@@ -785,7 +796,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,
......
...@@ -1209,11 +1209,11 @@ const constantDict = { ...@@ -1209,11 +1209,11 @@ const constantDict = {
billingMethod: [ billingMethod: [
{ {
value: "1", value: "1",
label: i18n.$t("电放"), label: i18n.$t("正本"),
}, },
{ {
value: "2", value: "2",
label: i18n.$t("正本"), label: i18n.$t("电放"),
}, },
], ],
// 是否有文件 // 是否有文件
......
...@@ -72,10 +72,7 @@ ...@@ -72,10 +72,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="row.operateType"></dict-tag> <dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="row.operateType"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作人')" prop="operator"> <el-table-column :label="$t('操作人')" prop="operatorName">
<template v-slot="{row}">
{{operatorFn(row.operator)}}
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作时间')" prop="operator"> <el-table-column :label="$t('操作时间')" prop="operator">
<template v-slot="{row}"> <template v-slot="{row}">
...@@ -119,7 +116,7 @@ ...@@ -119,7 +116,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="dataLog.operateType"></dict-tag> <dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="dataLog.operateType"></dict-tag>
</el-form-item> </el-form-item>
<el-form-item :label="$t('操作人')+':'"> <el-form-item :label="$t('操作人')+':'">
{{operatorFn(dataLog.operator)}} {{dataLog.operatorName}}
</el-form-item> </el-form-item>
<el-form-item :label="$t('操作时间')+':'"> <el-form-item :label="$t('操作时间')+':'">
{{parseTime(dataLog.createTime)}} {{parseTime(dataLog.createTime)}}
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
> >
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('客户')}}</span> <span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('客户')}}</span>
<customer-selector <customer-selector
ref="customer"
v-model="form.customerId" v-model="form.customerId"
@change="customerChange" @change="customerChange"
/> />
...@@ -767,8 +768,17 @@ export default { ...@@ -767,8 +768,17 @@ 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()
}
if (this.$route.query.receiptId && this.$route.query.receiptId != 0) {
this.receiptId = this.$route.query.receiptId;
this.getReceivableInfo()
}else{
this.removeData()
}
}, },
directives: { directives: {
'el-select-loadmore': { 'el-select-loadmore': {
...@@ -812,69 +822,11 @@ export default { ...@@ -812,69 +822,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();
...@@ -961,6 +913,69 @@ export default { ...@@ -961,6 +913,69 @@ export default {
this.pages = (res.data.total/this.codePage.pageSize)+1 this.pages = (res.data.total/this.codePage.pageSize)+1
}) })
}, 200) }, 200)
},
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)
...@@ -1210,7 +1225,7 @@ export default { ...@@ -1210,7 +1225,7 @@ export default {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6) return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6)
}, },
customerChange(value) { customerChange(value) {
if (this.flag) { if (this.flag||!value) {
this.flag = false this.flag = false
return return
} }
...@@ -1472,12 +1487,26 @@ export default { ...@@ -1472,12 +1487,26 @@ 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() {
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList() this.getList()
}, },
//清空数据
removeData(){
console.log(this.form)
this.$refs.customer.reset()
this.list = []
for(var i in this.form){
if(i=='receiptAccountList'){
this.$set(this.form,i,[])
}else{
this.$set(this.form,i,'')
}
}
}
}, },
}; };
</script> </script>
......
...@@ -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)
} }
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="offer-header"> <div class="offer-header">
<span style="font-size: 15px;">{{$t('报价单号')}}{{list.number}}</span> <span style="font-size: 15px;">{{$t('报价单号')}}{{list.number}}</span>
<div class="btns"> <div class="btns">
<el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="list.status!=5" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button> <el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[4,5,6].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button>
<el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button> <el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button>
<el-button v-hasPermi="['ecw:offer:result']" type="primary" v-if="[3,7].indexOf(list.status) > -1" size="mini" @click="toResult">{{$t('结果')}}</el-button> <el-button v-hasPermi="['ecw:offer:result']" type="primary" v-if="[3,7].indexOf(list.status) > -1" size="mini" @click="toResult">{{$t('结果')}}</el-button>
<el-button v-hasPermi="['ecw:offer:discount','ecw:offer:commission']" size="mini" v-if="[1,3,7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)" >{{$t('特价')}}</el-button> <el-button v-hasPermi="['ecw:offer:discount','ecw:offer:commission']" size="mini" v-if="[1,3,7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)" >{{$t('特价')}}</el-button>
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<el-table-column :label="$t('唛头')" align="center" prop="marks" /> <el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum" > <el-table-column :label="$t('箱数')" align="center" prop="sumNum" >
<template v-slot="{row}"> <template v-slot="{row}">
{{row.inWarehouseState > 1 ? row.sumNum : row.totalNum}} {{row.sumNum > 0 ? row.sumNum : row.totalNum}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight"> <el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight">
......
...@@ -46,35 +46,51 @@ ...@@ -46,35 +46,51 @@
<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-column :label="$t('货值')">
<template slot-scope="{row}">{{row.worth}}{{$t('')}}</template>
</el-table-column>
</el-table> </el-table>
</template> </template>
<warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body @close="currentWarehouseRecord=null"></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 {
props:{ components: {WarehouseRecord},
props:{
id: [String, Number] id: [String, Number]
}, },
data(){ data(){
return { return {
detail: null, detail: null,
order: null, order: null,
channel: null channel: null,
// 查看入仓记录的条目
currentWarehouseRecord: null
} }
}, },
watch:{ watch:{
...@@ -110,6 +126,12 @@ export default { ...@@ -110,6 +126,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
} }
} }
} }
...@@ -122,4 +144,4 @@ export default { ...@@ -122,4 +144,4 @@ export default {
font-weight: bold; font-weight: bold;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
{{detail.marks}} {{detail.marks}}
</td> </td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;"> <td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.prodTitleZh}}<br/>{{item.prodTitleEn}} <div style="white-space: nowrap">{{item.prodTitleZh}}</div>
<div style="white-space: nowrap">{{item.prodTitleEn}}</div>
</td> </td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;"> <td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.cartonsNum}} {{item.cartonsNum}}
......
...@@ -46,31 +46,45 @@ ...@@ -46,31 +46,45 @@
<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.weight}}kg</template> <template slot-scope="{row}">{{row.chargeVolume}}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')"> <el-table-column :label="$t('入仓重量')">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">{{row.weight}}kg</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.chargeWeight}}kg</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('备注')"> <el-table-column :label="$t('箱数')">
<template slot-scope="{row}">{{row.remark}}</template> <template slot-scope="{row}">
</el-table-column> <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 :label="$t('货值')">
<template slot-scope="{row}">{{row.worth}}{{$t('')}}</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template slot-scope="{row}">{{row.remark}}</template>
</el-table-column>
</el-table> </el-table>
</template> </template>
<warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body @close="currentWarehouseRecord=null"></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 {
props:{ components: {WarehouseRecord},
props:{
id: [String, Number] id: [String, Number]
}, },
data(){ data(){
...@@ -78,7 +92,9 @@ export default { ...@@ -78,7 +92,9 @@ export default {
detail: null, detail: null,
order: null, order: null,
channel: null, channel: null,
orderSplitBackVOList: [] // orderSplitBackVOList: [],
// 查看入仓记录的条目
currentWarehouseRecord: null
} }
}, },
watch:{ watch:{
...@@ -86,7 +102,7 @@ export default { ...@@ -86,7 +102,7 @@ export default {
this.getData() this.getData()
}, },
detail(){ detail(){
this.getSplit() // this.getSplit()
this.getOrder() this.getOrder()
}, },
order(){ order(){
...@@ -95,6 +111,11 @@ export default { ...@@ -95,6 +111,11 @@ export default {
} }
} }
}, },
computed:{
orderSplitBackVOList(){
return this.detail ? this.detail.orderSplitBackVOList : []
}
},
created(){ created(){
if(this.id){ if(this.id){
this.getData() this.getData()
...@@ -106,12 +127,12 @@ export default { ...@@ -106,12 +127,12 @@ export default {
this.detail = JSON.parse(res.data.details) this.detail = JSON.parse(res.data.details)
}) })
}, },
getSplit(){ /*getSplit(){
getSplitList({orderId: this.detail.orderId, lang: this.$i18n.locale.toLowerCase().indexOf('zh') > -1 ? 0 : 1 }).then(res => { getSplitList({orderId: this.detail.orderId, lang: this.$i18n.locale.toLowerCase().indexOf('zh') > -1 ? 0 : 1 }).then(res => {
console.log('getSplitList', res) console.log('getSplitList', res)
this.orderSplitBackVOList = res.data.orderSplitBackVOList this.orderSplitBackVOList = res.data.orderSplitBackVOList
}) })
}, },*/
getOrder(){ getOrder(){
getOrder(this.detail.orderId).then(res => { getOrder(this.detail.orderId).then(res => {
this.order = res.data this.order = res.data
...@@ -121,7 +142,13 @@ export default { ...@@ -121,7 +142,13 @@ 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
}
} }
} }
</script> </script>
...@@ -133,4 +160,4 @@ export default { ...@@ -133,4 +160,4 @@ export default {
font-weight: bold; font-weight: bold;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -138,7 +138,8 @@ export default { ...@@ -138,7 +138,8 @@ export default {
getReleaseInfo(this.orderId).then(res => this.detail = res.data) getReleaseInfo(this.orderId).then(res => this.detail = res.data)
seasoningCondimentsSelect({orderId: this.orderId}).then(res => { seasoningCondimentsSelect({orderId: this.orderId}).then(res => {
res.data.forEach(item => { res.data.forEach(item => {
item.releaseNum = item.sumNum - item.releaseNum item.release = item.releaseNum
item.releaseNum = item.sumNum - item.release
}) })
this.orders = res.data this.orders = res.data
}) })
...@@ -155,7 +156,7 @@ export default { ...@@ -155,7 +156,7 @@ export default {
// 放货箱数不能大于可放货箱数 // 放货箱数不能大于可放货箱数
let errNos = [] let errNos = []
this.selectedOrders.forEach(item => { this.selectedOrders.forEach(item => {
if(item.releaseNum > item.sumNum - item.releaseNum){ if(item.releaseNum > item.sumNum - item.release){
errNos.push(item.orderNo) errNos.push(item.orderNo)
} }
}) })
...@@ -172,7 +173,7 @@ export default { ...@@ -172,7 +173,7 @@ export default {
this.$emit('success') this.$emit('success')
}) })
}) })
} }
} }
...@@ -192,4 +193,4 @@ export default { ...@@ -192,4 +193,4 @@ export default {
margin-right:10px; margin-right:10px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
<work-flow xmlkey="order_modify" v-model="ccIdArr" /> <work-flow xmlkey="order_modify" v-model="ccIdArr" />
</el-card> </el-card>
<el-form label="" style="margin: 30px 0"> <el-form-item label="" style="margin: 30px 0">
<template v-if="form.applyStatus == 1"> <template v-if="form.applyStatus == 1">
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">{{$t('审核中')}}</el-button> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">{{$t('审核中')}}</el-button>
</template> </template>
...@@ -507,7 +507,7 @@ ...@@ -507,7 +507,7 @@
<el-button type="primary" @click="submitForm(2)" v-else>{{$t('编辑订单')}}</el-button> <!--修改--> <el-button type="primary" @click="submitForm(2)" v-else>{{$t('编辑订单')}}</el-button> <!--修改-->
</template> </template>
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button> <el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</el-form> </el-form-item>
</el-form> </el-form>
<el-dialog :title="$t('批量导入')" :visible.sync="showBatchImportDialog" width="1000px" :close-on-click-modal="false"> <el-dialog :title="$t('批量导入')" :visible.sync="showBatchImportDialog" width="1000px" :close-on-click-modal="false">
......
...@@ -326,7 +326,6 @@ ...@@ -326,7 +326,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :span="12" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'"> <el-row :span="12" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'">
<el-form-item v-if="orderExceptionData.orderExceptionStatus!=2" :label="$t('报关资料')+':'" size="medium" :require="true"> <el-form-item v-if="orderExceptionData.orderExceptionStatus!=2" :label="$t('报关资料')+':'" size="medium" :require="true">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.orderExceptionAttr" ></file-upload> <file-upload v-model="handlerParams.fileList" :value="orderExceptionData.orderExceptionAttr" ></file-upload>
...@@ -873,6 +872,7 @@ ...@@ -873,6 +872,7 @@
this.selectLine = this.routerList.find(item => item.id == this.handlerParams.lineId) this.selectLine = this.routerList.find(item => item.id == this.handlerParams.lineId)
}, },
// getDictData, // getDictData,
getDictData,
onTableMounted(e){ onTableMounted(e){
// console.warn('onTableMounted', e) // console.warn('onTableMounted', e)
}, },
......
This diff is collapsed.
<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="quantity" />
<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.orderLocationList)}}-->
<warehouse-area-select
v-model="row.orderLocationList"
readonly
:warehouse-id="warehouseId"
></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect/index.vue";
export default {
name: "WarehouseRecord",
components: {WarehouseAreaSelect},
props:{
list:{
type: Array,
default: []
},
warehouseId: Number,
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>
This diff is collapsed.
...@@ -18,7 +18,12 @@ ...@@ -18,7 +18,12 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('填单货物属性')"> <el-table-column :label="$t('填单货物属性')">
<template v-slot="{row}"> <template v-slot="{row}">
<div>{{$t('品牌')}}:无</div><div>{{$t('箱数')}}{{row.num}}</div><div>{{$t('体积')}}{{ row.volume }}</div><div>{{$t('重量')}}{{row.weight}}Kg</div> <div>{{$t('品牌')}}{{(brandList.find(item => item.id == row.brand) || {}).titleZh}} <span v-if="!row.brand">
{{$t('')}}
</span> </div>
<div>{{$t('箱数')}}{{row.num}}</div>
<div>{{$t('体积')}}{{ row.volume }}m³</div>
<div>{{$t('重量')}}{{row.weight}}Kg</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入库货物属性')"> <el-table-column :label="$t('入库货物属性')">
...@@ -26,13 +31,18 @@ ...@@ -26,13 +31,18 @@
<div v-for="(item,index) in row.orderWarehouseInBackItemDoList" :key="index"> <div v-for="(item,index) in row.orderWarehouseInBackItemDoList" :key="index">
<div>{{$t('规格')}}{{item.boxGauge.split('*').map(item =>`${item}cm`).join('*')}}</div> <div>{{$t('规格')}}{{item.boxGauge.split('*').map(item =>`${item}cm`).join('*')}}</div>
<div> <div>
<div>{{$t('品牌')}}{{(brandList.find(item => item.id == row.brand) || {}).titleZh}}
<div>{{$t('品牌')}}{{(brandList.find(item => item.id == row.brand) || {}).titleZh}}</div> <span v-if="!row.brand">
{{$t('')}}
</span></div>
<div>{{$t('箱数')}}{{item.cartonsNum}}</div> <div>{{$t('箱数')}}{{item.cartonsNum}}</div>
<div>{{$t('体积')}}{{item.volume}} CMB</div> <div>{{$t('体积')}}{{item.volume}} CMB</div>
<div>{{$t('重量')}}{{item.weight}}KG</div> <div>{{$t('重量')}}{{item.weight}}KG</div>
</div> </div>
</div> </div>
<p v-if="row.orderWarehouseInBackItemDoList.length === 0">
{{$t('暂无货物入库信息')}}
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('最后操作时间')"> <el-table-column :label="$t('最后操作时间')">
...@@ -42,7 +52,7 @@ ...@@ -42,7 +52,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('状态')"> <el-table-column :label="$t('状态')">
<template v-slot="{row}"> <template v-slot="{row}">
{{calculationStatus(row.cartonsNumDiff)}} {{calculationStatus(row)}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -265,13 +275,19 @@ export default { ...@@ -265,13 +275,19 @@ export default {
}, },
calculationStatus(){ calculationStatus(){
return (val)=>{ return (val)=>{
if(val > 0){ let des = ''
return `${this.$t('多')}${val}${this.$t('箱')}` switch (val.diffType) {
}else if(val < 0){ case 2 :
return `${this.$t('少')}${Math.abs(val)}${this.$t('箱')}` des = `${this.$t('多了')}${val.cartonsNumDiff}${this.$t('箱')}`
}else { break
return this.$t('准确到齐') case 3 :
} des = `${this.$t('少了')}${val.cartonsNumDiff}${this.$t('箱')}`
break
case 4 :
des = this.$t('准确到齐')
break
}
return des
} }
} }
}, },
...@@ -373,11 +389,13 @@ export default { ...@@ -373,11 +389,13 @@ export default {
volume += Number(i.volume) volume += Number(i.volume)
num += Number(i.num) num += Number(i.num)
weight += Number(i.weight) weight += Number(i.weight)
i.orderWarehouseInBackItemDoList.forEach(m => { if(i.orderWarehouseInBackItemDoList){
Wvolume += Number(m.volume || 0) i.orderWarehouseInBackItemDoList.forEach(m => {
Wnum += Number(m.cartonsNum || 0) Wvolume += Number(m.volume || 0)
Wweight += Number(m.weight || 0) Wnum += Number(m.cartonsNum || 0)
}) Wweight += Number(m.weight || 0)
})
}
}) })
let text = `${this.$t('下单统计')}:${num}${this.$t('箱')} ${volume.toFixed(2)}m³ ${weight.toFixed(2)}Kg` let text = `${this.$t('下单统计')}:${num}${this.$t('箱')} ${volume.toFixed(2)}m³ ${weight.toFixed(2)}Kg`
let text2 =` ${this.$t('入仓统计')}:${Wnum}${this.$t('箱')} ${Wvolume.toFixed(2)}m³ ${Wweight.toFixed(2)}Kg` let text2 =` ${this.$t('入仓统计')}:${Wnum}${this.$t('箱')} ${Wvolume.toFixed(2)}m³ ${Wweight.toFixed(2)}Kg`
......
...@@ -967,10 +967,11 @@ export default { ...@@ -967,10 +967,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