1.修改新增扫码单据页面

master
x_z 3 years ago
parent d82625bb8f
commit 0d507d2380

@ -71,7 +71,6 @@
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
clearable> clearable>
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"

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

Loading…
Cancel
Save