Commit 036bcc32 authored by 我在何方's avatar 我在何方
parents bd4d7c1a e3a86916
......@@ -39,6 +39,9 @@
<div style="color:red;fontWeight:bold;">
{{ scope.row.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</div>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.symbol}}</el-button>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('商品信息')" width="250px" align="center" prop="">
......@@ -128,7 +131,7 @@ import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils";
import WarehouseDetail from "./warehouseDetail";
import { getOrder } from "@/api/ecw/order";
import {getOrder, orderSpecialNeed} from "@/api/ecw/order";
import Exception from "@/views/ecw/box/components/Exception.vue";
export default {
......@@ -190,6 +193,7 @@ export default {
list.push({
...oItem,
warehouseInInfo,
advanceType:oItem.advanceType,
multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus,
......@@ -209,6 +213,26 @@ export default {
this.tallyList = list;
});
},
specialRendering(val){
console.log('val', val)
if(val !== undefined){
let i = val.split(',')
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1
}).map(item => {
// 打字开头的用最后一个字,否则取第一个字
item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
return item
})
}
},
deleteSpecial(id,orderId){
this.$confirm(this.$t('确定删除此特需么?')).then(() => {
return orderSpecialNeed({orderId:orderId,advanceType:id})
}).then(() => {
this.getList()
})
},
// 选中
checkboxSelect(selection) {
this.selectedRows = selection;
......
......@@ -28,7 +28,7 @@
<el-table border :data="tallyList" @select="checkboxSelect" @select-all="checkboxSelect" max-height="600px">
<el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<el-table-column :label="$t('订单号')" align="center" prop="orderNo" width="200" >
<template slot-scope="scope">
<div>
{{scope.row.orderNo}}
......@@ -39,6 +39,9 @@
<div style="color:red;fontWeight:bold;">
{{ scope.row.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</div>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.symbol}}</el-button>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('商品信息')" width="250px" align="center" prop="">
......@@ -120,7 +123,7 @@ import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils";
import WarehouseDetail from "./warehouseDetail";
import { getOrder } from "@/api/ecw/order";
import {getOrder, orderSpecialNeed} from "@/api/ecw/order";
export default {
name: "tally",
......@@ -174,10 +177,10 @@ export default {
if (oItem.warehouseInInfo) {
warehouseInInfo = JSON.parse(oItem.warehouseInInfo ?? {});
}
list.push({
...oItem,
warehouseInInfo,
advanceType:oItem.advanceType,
multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus,
......@@ -197,6 +200,26 @@ export default {
this.tallyList = list;
});
},
specialRendering(val){
console.log('val', val)
if(val !== undefined){
let i = val.split(',')
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1
}).map(item => {
// 打字开头的用最后一个字,否则取第一个字
item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
return item
})
}
},
deleteSpecial(id,orderId){
this.$confirm(this.$t('确定删除此特需么?')).then(() => {
return orderSpecialNeed({orderId:orderId,advanceType:id})
}).then(() => {
this.getList()
})
},
// 选中
checkboxSelect(selection) {
this.selectedRows = selection;
......
......@@ -119,6 +119,8 @@ export default {
// 表单校验
rules: {
name: [{ required: true, message: this.$t("名称不能为空"), trigger: "blur" }],
code: [{ required: true, message: this.$t("代码不能为空"), trigger: "blur" }],
warehouseId: [{ required: true, message: this.$t("仓库不能为空"), trigger: "blur" }],
}
};
},
......@@ -142,7 +144,8 @@ export default {
},
methods: {
positionManager(row) {
this.$router.push('/warehouse/warehouse-area-position?areaId=' + row.id);
// console.log(row)
this.$router.push('/warehouse/warehouse-area-position?areaId=' + row.id + "&warehouseId=" + row.warehouseId + "&domainId=" + row.pid);
},
/**查询仓库 */
......
......@@ -73,19 +73,19 @@
</el-form-item>
<el-form-item :label="$t('仓库')" prop="warehouseId">
<el-select v-model="form.warehouseId" clearable @change="changeWarehouse" :disabled="parentDo != null">
<el-select v-model="form.warehouseId" clearable @change="changeWarehouse" :disabled="parentDo != null || warehouseId != null">
<el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('库域')" prop="domainId">
<el-select v-model="form.domainId" clearable @change="changeDomain" :disabled="parentDo != null">
<el-select v-model="form.domainId" clearable @change="changeDomain" :disabled="parentDo != null || domainId != null">
<el-option v-for="domain in domainList" :key="domain.id" :label="domain.name" :value="domain.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('库区')" prop="areaId" >
<el-select v-model="form.areaId" clearable @change="changeArea" :disabled="parentDo != null">
<el-select v-model="form.areaId" clearable @change="changeArea" :disabled="parentDo != null || areaId != null">
<el-option v-for="area in areaList" :key="area.id" :label="area.name" :value="area.id" />
</el-select>
</el-form-item>
......@@ -114,6 +114,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { getWarehouseAreaList } from "@/api/ecw/warehouseArea"
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import d from "highlight.js/lib/languages/d";
export default {
name: "WarehouseAreaPosition",
......@@ -150,6 +151,9 @@ export default {
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
domainId: null,
areaId: null,
warehouseId: null,
// 查询参数
queryParams: {
page: 1,
......@@ -165,7 +169,11 @@ export default {
status: null,
},
// 表单参数
form: {},
form: {
warehouseId: null,
domainId: null,
areaId: null
},
// 表单校验
rules: {
code: [{ required: true, message: this.$t("储位代码不能为空"), trigger: "blur" }],
......@@ -221,10 +229,32 @@ computed: {
},
created() {
let warehouseId = this.$route.query.warehouseId;
console.log(this.$route.query);
if(warehouseId) {
warehouseId = parseInt(warehouseId)
this.warehouseId = warehouseId;
this.queryParams.warehouseId = warehouseId;
// this.form.warehouseId = warehouseId;
this.$set(this.form, 'warehouseId', warehouseId);
}
let domainId = this.$route.query.domainId;
if(domainId) {
domainId = parseInt(domainId)
this.domainId = domainId;
this.queryParams.domainId = domainId;
// this.form.domainId = domainId;
this.$set(this.form, 'domainId', domainId);
}
let areaId = this.$route.query.areaId;
if(areaId) {
areaId = parseInt(areaId)
this.areaId = areaId;
this.queryParams.areaId = areaId;
// this.form.areaId = areaId;
this.$set(this.form, 'areaId', areaId);
}
this.requestWarehouseList();
this.requestWarehouseAreaList();
this.getList();
......@@ -331,6 +361,15 @@ computed: {
this.parentDo = null;
this.form.status = 0;
this.form.isShelf = 1;
let p = this.$route.query
if(p.areaId){
this.form.areaId = +p.areaId
this.form.warehouseId = +p.warehouseId
this.form.domainId = +p.domainId
this.changeWarehouse( this.form.warehouseId)
this.changeDomain(this.form.domainId)
this.changeArea(this.form.areaId)
}
this.title = this.$t("添加储位");
},
/** 修改按钮操作 */
......
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