|
|
|
@ -24,23 +24,8 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
|
|
|
|
|
size="mini">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in storageList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button-group style="display: flex;">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="el-icon-refresh"
|
|
|
|
@ -50,13 +35,9 @@
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item style="margin-right: 50px; margin-left: auto">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="search" @click="addOrders">新增单据</el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="errOrders">异常单据</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="search" @click="addOrders">新增单据</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -68,57 +49,44 @@
|
|
|
|
|
@selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="扫码单据类型" prop="billTypeName">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="订单号" prop="id" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="订单号" prop="orderId" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="往来单位" prop="fromCorp"></el-table-column>
|
|
|
|
|
<el-table-column label="业务类型" prop="busName"></el-table-column>
|
|
|
|
|
<el-table-column label="来源订单号" prop="corpOrderId" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="来源" prop="fromType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="往来单位" prop="fromCorp" width="220">
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="当前仓库" prop="invName" width="120">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="来源" prop="fromType"></el-table-column>
|
|
|
|
|
<el-table-column label="创建时间" prop="actDate" show-overflow-tooltip>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<i class="el-icon-time"></i>
|
|
|
|
|
<span>{{ scope.row.actDate }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="校验状态" prop="status" width="100">
|
|
|
|
|
<el-table-column label="单据状态" prop="status" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag :type="(scope.row.status ===-1 ) | statusFilterType">{{
|
|
|
|
|
checkStatus[scope.row.status]
|
|
|
|
|
}}
|
|
|
|
|
</el-tag>
|
|
|
|
|
<el-tag>{{ orderStatus[scope.row.status] }}</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="出入库仓库" prop="locStorageName" width="100"></el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="150" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="addOrders(scope.row)"
|
|
|
|
|
@click.native.stop="handleModifyClick(scope.row)"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="deleteDialog(scope.row.id)"
|
|
|
|
|
>删除
|
|
|
|
|
@click.native.stop="addOrders(scope.row)"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
v-if="scope.row.status !== -1"
|
|
|
|
|
@click.native.stop="onUpload(scope.row.id)"
|
|
|
|
|
>立即处理
|
|
|
|
|
@click.native.stop="deleteDialog(scope.row.id)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
@ -133,17 +101,6 @@
|
|
|
|
|
:current-page="filterQuery.page"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="异常订单"
|
|
|
|
|
:visible.sync="errOrderVisible"
|
|
|
|
|
width="80%"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
>
|
|
|
|
|
<ioErrorOrder
|
|
|
|
|
></ioErrorOrder>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:visible.sync="addOrderVisible"
|
|
|
|
@ -163,6 +120,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getBussinessType} from "@/api/basic/bussinessType";
|
|
|
|
|
import {filterOrder, deleteByOrderId} from "@/api/warehouse/order";
|
|
|
|
|
import ioErrorOrder from "@/views/warehouse/ioErrorOrder";
|
|
|
|
|
import addOrder from "@/views/warehouse/addOrder";
|
|
|
|
|
|
|
|
|
@ -173,27 +132,16 @@ export default {
|
|
|
|
|
id: null,
|
|
|
|
|
mainAction: null,
|
|
|
|
|
action: null,
|
|
|
|
|
status: null,
|
|
|
|
|
locStorageCode: null,
|
|
|
|
|
status: -1,
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
list: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
formData: {
|
|
|
|
|
id: null,
|
|
|
|
|
name: null,
|
|
|
|
|
prefix: null,
|
|
|
|
|
startNum: null,
|
|
|
|
|
step: 1,
|
|
|
|
|
serialNum: null,
|
|
|
|
|
status: 1,
|
|
|
|
|
remark: null
|
|
|
|
|
},
|
|
|
|
|
storageList: [],
|
|
|
|
|
busTypes: [],
|
|
|
|
|
errOrderVisible: false,
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "新增单据",
|
|
|
|
|
update: "编辑单据",
|
|
|
|
@ -201,8 +149,19 @@ export default {
|
|
|
|
|
formName: null,
|
|
|
|
|
addOrderVisible: false,
|
|
|
|
|
idQuery: {
|
|
|
|
|
id: ""
|
|
|
|
|
}
|
|
|
|
|
id: "",
|
|
|
|
|
corpOrderId: null,
|
|
|
|
|
billType: null,
|
|
|
|
|
locStorageCode: null,
|
|
|
|
|
actDate: null,
|
|
|
|
|
fromCorp: null,
|
|
|
|
|
},
|
|
|
|
|
orderStatus: {
|
|
|
|
|
'-1': "草稿",
|
|
|
|
|
1: "等待处理",
|
|
|
|
|
3: "校验失败",
|
|
|
|
|
4: "已校验",
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -214,49 +173,53 @@ export default {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: ""
|
|
|
|
|
});
|
|
|
|
|
this.query = {
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
id: null,
|
|
|
|
|
mainAction: null,
|
|
|
|
|
action: null,
|
|
|
|
|
status: null,
|
|
|
|
|
locStorageCode: null,
|
|
|
|
|
status: -1,
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
resetForm() {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['formData'].resetFields();
|
|
|
|
|
this.$refs["formData"].clearValidate();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
search() {
|
|
|
|
|
this.query.page = 1;
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
|
|
|
|
|
filterOrder(this.filterQuery).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.list = res.data.list || [];
|
|
|
|
|
this.total = res.data.total || 0;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
cancelDialog() {
|
|
|
|
|
},
|
|
|
|
|
handleModifyClick(row) {
|
|
|
|
|
this.formData = row;
|
|
|
|
|
this.formName = 'edit';
|
|
|
|
|
this.addOrderVisible = true;
|
|
|
|
|
this.idQuery = {
|
|
|
|
|
id: row.orderId,
|
|
|
|
|
corpOrderId: row.corpOrderId,
|
|
|
|
|
billType: row.action,
|
|
|
|
|
locStorageCode: row.locStorageCode,
|
|
|
|
|
fromCorp: row.fromCorp,
|
|
|
|
|
actDate: row.actDate
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
change() {
|
|
|
|
|
},
|
|
|
|
|
addOrders() {
|
|
|
|
|
this.addOrderVisible = true;
|
|
|
|
|
this.formName = "add";
|
|
|
|
|
},
|
|
|
|
|
errOrders() {
|
|
|
|
|
this.errOrderVisible = true;
|
|
|
|
|
},
|
|
|
|
|
onUpload(id) {
|
|
|
|
|
|
|
|
|
|
this.idQuery = {};
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
|
|
|
|
|
this.addOrderVisible = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
deleteDialog(row) {
|
|
|
|
|
this.$confirm("此操作将删除单据, 是否继续?", "提示", {
|
|
|
|
@ -265,7 +228,13 @@ export default {
|
|
|
|
|
type: "warning"
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let params = {id: row.id};
|
|
|
|
|
let params = {id: row.orderId};
|
|
|
|
|
deleteByOrderId(params).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("删除成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -273,13 +242,20 @@ export default {
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.query.page = val;
|
|
|
|
|
this.filterQuery.page = val;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
getBusType() {
|
|
|
|
|
let params = {customerId: this.$store.getters.customerId};
|
|
|
|
|
getBussinessType(params).then((res) => {
|
|
|
|
|
this.busTypes = res.data.list;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBusType();
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|