Commit 036bcc32 authored by 我在何方's avatar 我在何方
parents bd4d7c1a e3a86916
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
<div style="color:red;fontWeight:bold;"> <div style="color:red;fontWeight:bold;">
{{ scope.row.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}} {{ scope.row.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</div> </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> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品信息')" width="250px" align="center" prop=""> <el-table-column :label="$t('商品信息')" width="250px" align="center" prop="">
...@@ -128,7 +131,7 @@ import batchTally from "./batchTally.vue"; ...@@ -128,7 +131,7 @@ import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea"; import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils"; import { formatDate, serviceMsg } from "../../utils";
import WarehouseDetail from "./warehouseDetail"; 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"; import Exception from "@/views/ecw/box/components/Exception.vue";
export default { export default {
...@@ -190,6 +193,7 @@ export default { ...@@ -190,6 +193,7 @@ export default {
list.push({ list.push({
...oItem, ...oItem,
warehouseInInfo, warehouseInInfo,
advanceType:oItem.advanceType,
multiSpecification: oItem.multiSpecification, multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo, positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus, tallyStatus: item.tallyStatus,
...@@ -209,6 +213,26 @@ export default { ...@@ -209,6 +213,26 @@ export default {
this.tallyList = list; 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) { checkboxSelect(selection) {
this.selectedRows = selection; this.selectedRows = selection;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<el-table border :data="tallyList" @select="checkboxSelect" @select-all="checkboxSelect" max-height="600px"> <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 type="selection" align="center" width="55" fixed="left" />
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" /> <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"> <template slot-scope="scope">
<div> <div>
{{scope.row.orderNo}} {{scope.row.orderNo}}
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
<div style="color:red;fontWeight:bold;"> <div style="color:red;fontWeight:bold;">
{{ scope.row.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}} {{ scope.row.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</div> </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> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品信息')" width="250px" align="center" prop=""> <el-table-column :label="$t('商品信息')" width="250px" align="center" prop="">
...@@ -120,7 +123,7 @@ import batchTally from "./batchTally.vue"; ...@@ -120,7 +123,7 @@ import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea"; import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils"; import { formatDate, serviceMsg } from "../../utils";
import WarehouseDetail from "./warehouseDetail"; import WarehouseDetail from "./warehouseDetail";
import { getOrder } from "@/api/ecw/order"; import {getOrder, orderSpecialNeed} from "@/api/ecw/order";
export default { export default {
name: "tally", name: "tally",
...@@ -174,10 +177,10 @@ export default { ...@@ -174,10 +177,10 @@ export default {
if (oItem.warehouseInInfo) { if (oItem.warehouseInInfo) {
warehouseInInfo = JSON.parse(oItem.warehouseInInfo ?? {}); warehouseInInfo = JSON.parse(oItem.warehouseInInfo ?? {});
} }
list.push({ list.push({
...oItem, ...oItem,
warehouseInInfo, warehouseInInfo,
advanceType:oItem.advanceType,
multiSpecification: oItem.multiSpecification, multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo, positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus, tallyStatus: item.tallyStatus,
...@@ -197,6 +200,26 @@ export default { ...@@ -197,6 +200,26 @@ export default {
this.tallyList = list; 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) { checkboxSelect(selection) {
this.selectedRows = selection; this.selectedRows = selection;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<span>{{ scope.row.pid == 0 ? $t('库域') : $t('库区') }}</span> <span>{{ scope.row.pid == 0 ? $t('库域') : $t('库区') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('仓库')" align="center" prop="warehouse" width="180"> <el-table-column :label="$t('仓库')" align="center" prop="warehouse" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ warehouseName(scope.row.warehouseId) }}</span> <span>{{ warehouseName(scope.row.warehouseId) }}</span>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-button size="mini" type="text" @click="handleCreate(scope.row)" v-if="scope.row.pid==0" <el-button size="mini" type="text" @click="handleCreate(scope.row)" v-if="scope.row.pid==0"
v-hasPermi="['ecw:warehouse-area:create']">{{$t('添加库区')}}</el-button> v-hasPermi="['ecw:warehouse-area:create']">{{$t('添加库区')}}</el-button>
<el-button size="mini" type="text" @click="positionManager(scope.row)" v-if="scope.row.pid>0" <el-button size="mini" type="text" @click="positionManager(scope.row)" v-if="scope.row.pid>0"
v-hasPermi="['ecw:warehouse-area:create']">{{$t('查看储位')}}</el-button> v-hasPermi="['ecw:warehouse-area:create']">{{$t('查看储位')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('仓库')" prop="warehouseId"> <el-form-item :label="$t('仓库')" prop="warehouseId">
<el-select v-model="form.warehouseId" clearable :disabled="parentDo"> <el-select v-model="form.warehouseId" clearable :disabled="parentDo">
<el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" /> <el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button> <el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
...@@ -119,6 +119,8 @@ export default { ...@@ -119,6 +119,8 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
name: [{ required: true, message: this.$t("名称不能为空"), trigger: "blur" }], 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 { ...@@ -142,7 +144,8 @@ export default {
}, },
methods: { methods: {
positionManager(row) { 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);
}, },
/**查询仓库 */ /**查询仓库 */
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<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="code"> <el-form-item :label="$t('储位代码')" prop="code">
<el-input v-model="queryParams.code" :placeholder="$t('请输入储位代码')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.code" :placeholder="$t('请输入储位代码')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:warehouse-area-position:create']">{{$t('新增储位')}}</el-button> v-hasPermi="['ecw:warehouse-area-position:create']">{{$t('新增储位')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('库域')" align="center" prop="domainName" /> <el-table-column :label="$t('库域')" align="center" prop="domainName" />
<el-table-column :label="$t('库区')" align="center" prop="areaName" /> <el-table-column :label="$t('库区')" align="center" prop="areaName" />
<el-table-column :label="$t('货架')" align="center" prop="isShelf"> <el-table-column :label="$t('货架')" align="center" prop="isShelf">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.isShelf == 1 ? $t('') : $t('') }}</span> <span>{{ scope.row.isShelf == 1 ? $t('') : $t('') }}</span>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<span>{{ scope.row.status == CommonStatusEnum.ENABLE ? $t('') : $t('') }}</span> <span>{{ scope.row.status == CommonStatusEnum.ENABLE ? $t('') : $t('') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
...@@ -73,22 +73,22 @@ ...@@ -73,22 +73,22 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('仓库')" prop="warehouseId"> <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-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('库域')" prop="domainId"> <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-option v-for="domain in domainList" :key="domain.id" :label="domain.name" :value="domain.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('库区')" prop="areaId" > <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-option v-for="area in areaList" :key="area.id" :label="area.name" :value="area.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('货架')" prop="isShelf"> <el-form-item :label="$t('货架')" prop="isShelf">
<el-radio v-model.number="form.isShelf" :label="1">{{$t('是')}}</el-radio> <el-radio v-model.number="form.isShelf" :label="1">{{$t('是')}}</el-radio>
...@@ -114,6 +114,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse" ...@@ -114,6 +114,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { getWarehouseAreaList } from "@/api/ecw/warehouseArea" import { getWarehouseAreaList } from "@/api/ecw/warehouseArea"
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'
import d from "highlight.js/lib/languages/d";
export default { export default {
name: "WarehouseAreaPosition", name: "WarehouseAreaPosition",
...@@ -150,6 +151,9 @@ export default { ...@@ -150,6 +151,9 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
dateRangeCreateTime: [], dateRangeCreateTime: [],
domainId: null,
areaId: null,
warehouseId: null,
// 查询参数 // 查询参数
queryParams: { queryParams: {
page: 1, page: 1,
...@@ -165,7 +169,11 @@ export default { ...@@ -165,7 +169,11 @@ export default {
status: null, status: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {
warehouseId: null,
domainId: null,
areaId: null
},
// 表单校验 // 表单校验
rules: { rules: {
code: [{ required: true, message: this.$t("储位代码不能为空"), trigger: "blur" }], code: [{ required: true, message: this.$t("储位代码不能为空"), trigger: "blur" }],
...@@ -221,10 +229,32 @@ computed: { ...@@ -221,10 +229,32 @@ computed: {
}, },
created() { 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; let areaId = this.$route.query.areaId;
if(areaId) { if(areaId) {
areaId = parseInt(areaId)
this.areaId = areaId;
this.queryParams.areaId = areaId; this.queryParams.areaId = areaId;
// this.form.areaId = areaId;
this.$set(this.form, 'areaId', areaId);
} }
this.requestWarehouseList(); this.requestWarehouseList();
this.requestWarehouseAreaList(); this.requestWarehouseAreaList();
this.getList(); this.getList();
...@@ -331,6 +361,15 @@ computed: { ...@@ -331,6 +361,15 @@ computed: {
this.parentDo = null; this.parentDo = null;
this.form.status = 0; this.form.status = 0;
this.form.isShelf = 1; 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("添加储位"); 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