bug修复

fengcang
anthonyywj2 3 years ago
parent 5a0d441e83
commit d927096374

@ -255,7 +255,7 @@
</el-col>
<el-col :span="7">
<el-form-item prop="count">
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true"></el-input>
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">

@ -165,6 +165,7 @@
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef'
placeholder="请输入批次号" style="width: 80%"></el-input>
</template>

@ -369,7 +369,7 @@
</el-col>
<el-col :span="7">
<el-form-item prop="count">
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true"></el-input>
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
@ -456,6 +456,7 @@
<el-form-item prop="price">
<el-input v-model="detailFormData.price"
clearable
type="number"
auto-complete="off" :disabled="false"></el-input>
</el-form-item>
</el-col>

@ -363,7 +363,7 @@
<el-col :span="7">
<el-form-item prop="count">
<el-input v-model="detailFormData.count" auto-complete="off"
clearable
clearable type="number"
:disabled="false"></el-input>
</el-form-item>
</el-col>
@ -443,6 +443,7 @@
<el-form-item prop="batchNo">
<el-input v-model="detailFormData.price"
clearable
type="number"
auto-complete="off" :disabled="false"></el-input>
</el-form-item>
</el-col>

@ -51,10 +51,11 @@
<!-- <el-input v-model="formData.billdate" auto-complete="off"></el-input>-->
<el-date-picker
v-model="formData.billdate"
type="date"
type="datetime"
placeholder="选择日期"
style="width: 100%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
@ -69,7 +70,7 @@
</el-col>
<el-col :span="7">
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择业务类型"
<el-select v-model="formData.billType" placeholder="请选择业务类型" :disabled="codeArray.length>0"
@change="actionChange">
<el-option
v-for="item in busTypes"
@ -95,7 +96,7 @@
v-model="formData.corpName"
filterable
remote
clearable="true"
clearable="true" :disabled="codeArray.length>0"
reserve-keyword
placeholder="请输入往来单位"
:remote-method="findMethod"
@ -117,7 +118,7 @@
<el-select
v-model="formData.corpName"
filterable
remote
remote :disabled="codeArray.length>0"
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
@ -138,6 +139,7 @@
</el-select>
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
:disabled="codeArray.length>0"
>
<el-option
v-for="item in fromSubStorageOptions"
@ -151,7 +153,7 @@
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp"
<el-form-item class="query-form-item" prop="fromCorp" :disabled="codeArray.length>0"
v-if="curAction.corpType ==2 && curAction.genUnit">
<el-input v-model="formData.corpName" auto-complete="off"
clearable
@ -171,6 +173,7 @@
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
:disabled="codeArray.length>0"
clearable>
<el-option
v-for="item in storageList"
@ -193,6 +196,7 @@
<el-col :span="7">
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
:disabled="codeArray.length>0"
clearable>
<el-option
v-for="item in subInvList"
@ -217,7 +221,8 @@
<el-col :span="7">
<el-form-item prop="type" style="margin-right: 20px;"
v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
<el-checkbox v-model="formData.noInvOut"></el-checkbox>
<el-checkbox v-model="formData.noInvOut" :disabled="codeArray.length>0">
</el-checkbox>
</el-form-item>
</el-col>
</el-row>
@ -259,6 +264,7 @@
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef'
placeholder="请输入批次号" style="width: 80%"></el-input>
</template>

@ -347,7 +347,7 @@
</el-col>
<el-col :span="7">
<el-form-item prop="count">
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true"></el-input>
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">

@ -235,7 +235,8 @@
</el-col>
<el-col :span="7">
<el-form-item prop="count">
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true"></el-input>
<el-input v-model="detailFormData.count" auto-complete="off" :disabled="true"
type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
@ -343,11 +344,11 @@
<script>
import {
stockOrderList, stockOrderDetail,
deleteStockOrderById, deleteStockOrderDetailById,
copyStockOrderDetail, submitStockOrder,
uploadStockOrderDetail, uploadStockOrderDetailCount,
generateStockOrderQRCodeText, updateStockOrder
stockOrderList, stockOrderDetail,
deleteStockOrderById, deleteStockOrderDetailById,
copyStockOrderDetail, submitStockOrder,
uploadStockOrderDetail, uploadStockOrderDetailCount,
generateStockOrderQRCodeText, updateStockOrder
} from "../../api/inout/stockOrder";
import {BASE_URL} from "../../config/app";
import stockOrderDistribution from "./stockOrderDistribution";

@ -1,153 +1,153 @@
<template>
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="filterQuery"
class="query-form"
size="mini"
>
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.localAction" placeholder="请选择业务类型">
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="filterQuery"
class="query-form"
size="mini"
>
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.localAction" placeholder="请选择业务类型">
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>单据日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="importErps"
>导入比对
</el-button
>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="importErps"
>导入比对
</el-button
>
<!-- <el-button type="primary" icon="search" @click="combineErps"
>合并下载</el-button
> -->
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
highlight-current-row="true"
@selection-change="handleSelectionChange"
@row-click="getOrderDetail"
style="width: 100%"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="订单ID"
prop="billNo"
:show-overflow-tooltip="true"
></el-table-column>
<!-- <el-table-column-->
<!-- label="客户ID"-->
<!-- prop="corpId"-->
<!-- :show-overflow-tooltip="true"-->
<!-- ></el-table-column>-->
<el-table-column
label="客户名称"
prop="corpName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="单据日期"
show-overflow-tooltip
prop="billdate"
></el-table-column>
<el-table-column label="业务单据类型" prop="billType"></el-table-column>
<!-- <el-button type="primary" icon="search" @click="combineErps"
>合并下载</el-button
> -->
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
highlight-current-row="true"
@selection-change="handleSelectionChange"
@row-click="getOrderDetail"
style="width: 100%"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="订单ID"
prop="billNo"
:show-overflow-tooltip="true"
></el-table-column>
<!-- <el-table-column-->
<!-- label="客户ID"-->
<!-- prop="corpId"-->
<!-- :show-overflow-tooltip="true"-->
<!-- ></el-table-column>-->
<el-table-column
label="客户名称"
prop="corpName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="单据日期"
show-overflow-tooltip
prop="billdate"
></el-table-column>
<el-table-column label="业务单据类型" prop="billType"></el-table-column>
<!-- <el-table-column label="下载状态" prop="isDownload"></el-table-column> -->
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<!-- <el-table-column label="下载状态" prop="isDownload"></el-table-column> -->
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table
v-loading="detailLoading"
:data="detailList"
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-card class="el-card">
<el-table
v-loading="detailLoading"
:data="detailList"
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="产品ID"
prop="productId"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="产品ID"
prop="productId"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="产品名称"
prop="productName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="批号"
prop="batchNo"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="单据数量" prop="reCount"></el-table-column>
<el-table-column label="实际数量" prop="count">
</el-table-column>
</el-table>
</el-card>
</div>
<el-table-column
label="产品名称"
prop="productName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="批号"
prop="batchNo"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="单据数量" prop="count"></el-table-column>
<el-table-column label="实际数量" prop="reCount">
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import {
combineErpOrder,
selectErpOrder,
getCloudErp,
combineErpOrder,
selectErpOrder,
getCloudErp,
} from "../../api/inout/erpOrder";
import {stockListDetail} from "../../api/inout/stockOrder"
@ -155,253 +155,253 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, filterByBus} from "../../api/basic/busLocalType";
export default {
name: "orderId",
props: {
orderId: {
type: Object,
required: true,
name: "orderId",
props: {
orderId: {
type: Object,
required: true,
},
orderAction: {
type: Object,
required: true,
},
curLocInv: {
type: Object,
required: true,
}
},
orderAction: {
type: Object,
required: true,
},
curLocInv: {
type: Object,
required: true,
}
},
data() {
return {
filterQuery: {
billcode: "",
billFlag: null,
localAction: null,
startDate: null,
endDate: null,
status: 3,
page: 1,
limit: 5,
},
value: "",
total: 0,
list: [],
busTypes: [],
loading: false,
detailLoading: false,
detailList: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
data() {
return {
filterQuery: {
billcode: "",
billFlag: null,
localAction: null,
startDate: null,
endDate: null,
status: 3,
page: 1,
limit: 5,
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
value: "",
total: 0,
list: [],
busTypes: [],
loading: false,
detailLoading: false,
detailList: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
multipleSelection: [],
postQuery: {
orderId: "",
purchaseinResponses: [],
},
},
],
},
multipleSelection: [],
postQuery: {
orderId: "",
purchaseinResponses: [],
},
idQuery: {
id: "",
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
billFlag: null,
localAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 5,
status: 3,
};
this.actDateRange = [];
this.getList();
idQuery: {
id: "",
},
};
},
onSubmit() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.locStorageCode = this.curLocInv;
stockListDetail(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.detailList = [];
this.total = response.data.total || 0;
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
billFlag: null,
localAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 5,
status: 3,
};
this.actDateRange = [];
this.getList();
},
onSubmit() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.$message.error(response.message);
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.locStorageCode = this.curLocInv;
stockListDetail(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.detailList = [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
//
getOrderDetail(row) {
//
getOrderDetail(row) {
this.detailList = row.subErpOrders;
},
this.detailList = row.subErpOrders;
},
importErps() {
var selectData = this.multipleSelection;
importErps() {
var selectData = this.multipleSelection;
this.postQuery.purchaseinResponses = [],
selectData.forEach((obj, index) => {
this.postQuery.purchaseinResponses.push(obj);
});
selectData.forEach((obj, index) => {
this.postQuery.purchaseinResponses.push(obj);
});
if (this.postQuery.purchaseinResponses.length < 1) {
this.$message.warning("选择的订单需大于1");
return;
}
this.postQuery.orderId = this.orderId;
selectErpOrder(this.postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
combineErps() {
var selectData = this.multipleSelection;
if (this.postQuery.purchaseinResponses.length < 1) {
this.$message.warning("选择的订单需大于1");
return;
}
this.postQuery.orderId = this.orderId;
selectErpOrder(this.postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
selectData.forEach((obj, index) => {
this.postQuery.docids.push(obj.docid);
});
if (this.postQuery.docids.length < 1) {
this.$message.warning("选择的订单需大于1");
return;
}
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
combineErps() {
var selectData = this.multipleSelection;
selectData.forEach((obj, index) => {
this.postQuery.docids.push(obj.docid);
});
combineErpOrder(this.postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
if (this.postQuery.docids.length < 1) {
this.$message.warning("选择的订单需大于1");
return;
}
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
},
getBusType() {
let query = {
enabled: true,
};
getLocalBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
this.getCurBillAction();
})
.catch(() => {
});
combineErpOrder(this.postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
getCurBillAction() {
let tQuery = {
action: this.orderAction
}
filterByBus(tQuery)
.then((response) => {
this.filterQuery.localAction = response.data;
this.getList();
})
.catch(() => {
});
}
},
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
components: {},
mounted() {
},
getBusType() {
let query = {
enabled: true,
};
getLocalBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
this.getCurBillAction();
})
.catch(() => {
});
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getBusType();
},
getCurBillAction() {
let tQuery = {
action: this.orderAction
}
filterByBus(tQuery)
.then((response) => {
this.filterQuery.localAction = response.data;
this.getList();
})
.catch(() => {
});
}
},
components: {},
mounted() {
},
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getBusType();
},
};
</script>
<style scoped>
.el-card {
margin-right: 20px;
/*transition: all .5s;*/
margin-right: 20px;
/*transition: all .5s;*/
}
</style>

@ -291,6 +291,7 @@ export default {
locStorageCode: null,
invWarehouseCode: null,
id: "",
status: 5,
mainAction: null,
action: null,
page: 1,
@ -343,6 +344,7 @@ export default {
},
addType: "edit",
deleteData: {
status: 5,
id: "",
},
erpCheckStatus: {
@ -447,11 +449,18 @@ export default {
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error("补录单据列表已不存在该扫码单据!");
this.getList();
}
})
.catch(() => {
});

@ -414,7 +414,7 @@ export default {
orderId: "",
},
deleteData: {
id: "",
id: "", status: 2,
},
idQuery: {
id: "",
@ -700,12 +700,18 @@ export default {
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
this.getList();
this.refresgOrderDetail();
this.$message({
type: "success",
message: "删除成功!",
});
if (response.code == 20000) {
this.getList();
this.refresgOrderDetail();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error("新增扫码单据列表已不存在该扫码单据!");
this.getList();
}
})
.catch(() => {
});

@ -299,6 +299,7 @@ export default {
mainAction: null,
action: null,
page: 1,
status: 3,
limit: 20,
locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
@ -353,6 +354,7 @@ export default {
},
deleteData: {
id: "",
status: 3,
},
dialogTableVisible: false,
formLoading: false,
@ -473,11 +475,16 @@ export default {
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error("异常扫码单据列表已不存在该扫码单据!");
this.getList();
}
})
.catch(() => {
});

@ -359,6 +359,7 @@ export default {
},
deleteData: {
id: "",
status: 10,
},
dialogTableVisible: false,
formLoading: false,
@ -594,11 +595,18 @@ export default {
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error("新增扫码单据列表已不存在该扫码单据!");
this.getList();
}
})
.catch(() => {
});

@ -81,7 +81,7 @@
<el-table-column label="状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag :type="(scope.row.status == 3) | statusFilterType">{{
checkStatus[scope.row.status]
checkStatus[scope.row.status]
}}
</el-tag>
</template>
@ -199,294 +199,302 @@
</template>
<script>
import {
orderListByStatus,
deleteByOrderId,
commitOrder,
updateUnit,
} from "../../api/inout/order";
import {repeatCheck} from "../../api/inout/erpOrder";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import {getBussinessType} from "../../api/basic/bussinessType";
import draggable from "vuedraggable";
import codeDetail from "./IOFinishCode";
import {
orderListByStatus,
deleteByOrderId,
commitOrder,
updateUnit,
} from "../../api/inout/order";
import {repeatCheck} from "../../api/inout/erpOrder";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import {getBussinessType} from "../../api/basic/bussinessType";
import draggable from "vuedraggable";
import codeDetail from "./IOFinishCode";
const formJson = {
site_id: "",
site_name: "",
describe: "",
ads: [],
};
const formJson = {
site_id: "",
site_name: "",
describe: "",
ads: [],
};
export default {
data() {
return {
filterQuery: {
id: "",
mainAction: null,
action: null,
page: 1,
limit: 20,
status: 2
},
checkStatus: {
1: "等待处理",
2: "等待校验",
3: "处理异常",
4: "已完成"
},
curIndex: "",
unitquery: {key: "", page: 1, limit: 20},
unitlist: [],
busTypes: [],
unitUpdateQuery: {
id: "",
fromCorpId: "",
fromCorp: "",
},
idQuery: {
id: "",
},
list: [],
adId: [],
adSelectList: [],
adList: {},
adListNoDataText: "无数据",
queryAdIdAsyncLoading: false,
codeDetailVisible: false,
total: 0,
loading: true,
index: null,
formName: null,
errorDetail: "1111111111111",
formMap: {
add: "新增",
edit: "编辑",
},
deleteData: {
id: "",
},
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
formData: formJson,
deleteLoading: false,
};
},
components: {
draggable,
codeDetail,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
mainAction: null,
action: null,
page: 1,
limit: 20,
status: 2
};
this.getList();
},
onSubmit() {
this.loading = true;
this.getList();
export default {
data() {
return {
filterQuery: {
id: "",
mainAction: null,
action: null,
page: 1,
limit: 20,
status: 2
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
checkStatus: {
1: "等待处理",
2: "等待校验",
3: "处理异常",
4: "已完成"
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
curIndex: "",
unitquery: {key: "", page: 1, limit: 20},
unitlist: [],
busTypes: [],
unitUpdateQuery: {
id: "",
fromCorpId: "",
fromCorp: "",
},
handleUnitClick(row) {
this.curIndex = row.id;
this.dialogTableVisible = true;
idQuery: {
id: "",
},
closeDetailDialog() {
this.codeDetailVisible = false;
list: [],
adId: [],
adSelectList: [],
adList: {},
adListNoDataText: "无数据",
queryAdIdAsyncLoading: false,
codeDetailVisible: false,
total: 0,
loading: true,
index: null,
formName: null,
errorDetail: "1111111111111",
formMap: {
add: "新增",
edit: "编辑",
},
getUnitList() {
this.loading = true;
getBasicUnitMaintains(this.unitquery)
.then((response) => {
this.loading = false;
this.unitlist = response.data.page.list || [];
})
.catch(() => {
this.loading = false;
});
deleteData: {
id: "",
status: 2
},
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
formData: formJson,
deleteLoading: false,
};
},
components: {
draggable,
codeDetail,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
mainAction: null,
action: null,
page: 1,
limit: 20,
status: 2
};
this.getList();
},
onSubmit() {
this.loading = true;
this.getList();
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleUnitClick(row) {
this.curIndex = row.id;
this.dialogTableVisible = true;
},
closeDetailDialog() {
this.codeDetailVisible = false;
},
getUnitList() {
this.loading = true;
getBasicUnitMaintains(this.unitquery)
.then((response) => {
this.loading = false;
this.unitlist = response.data.page.list || [];
})
.catch(() => {
this.loading = false;
});
},
selectUnit(row) {
console.log(row.id);
this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.unitid;
updateUnit(this.unitUpdateQuery)
.then((response) => {
if (response.code == 20000) {
this.dialogTableVisible = false;
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
selectUnit(row) {
console.log(row.id);
this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.unitid;
updateUnit(this.unitUpdateQuery)
.then((response) => {
if (response.code == 20000) {
this.dialogTableVisible = false;
});
},
//
getList() {
this.loading = true;
orderListByStatus(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
this.getList();
} else {
this.$message.error(response.message);
}
deleteOrders(data) {
this.loading = true;
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
})
.catch(() => {
this.dialogTableVisible = false;
});
},
//
getList() {
this.loading = true;
orderListByStatus(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteOrders(data) {
this.loading = true;
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
});
},
} else if (response.code == 520) {
this.$message.error("等待校验单据列表已不存在该扫码单据!");
this.getList();
}
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
.catch(() => {
});
},
onUpload(data) {
this.loading = true;
var idQuery = {
orderId: "",
};
idQuery.orderId = data;
commitOrder(idQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
repeatCheckClick(row) {
let tQuery = {
orderId: row.id,
};
this.loading = true;
repeatCheck(tQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success(response.data);
this.getList();
this.detailQuery = {
orderId: row.id,
};
this.refresgOrderDetail();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
onUpload(data) {
this.loading = true;
var idQuery = {
orderId: "",
};
idQuery.orderId = data;
commitOrder(idQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
});
},
repeatCheckClick(row) {
let tQuery = {
orderId: row.id,
};
this.loading = true;
repeatCheck(tQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success(response.data);
this.getList();
this.detailQuery = {
orderId: row.id,
};
this.refresgOrderDetail();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.getList();
handleErrorDetail(poistion) {
var mOrder = this.list[poistion];
var corpOrderId = mOrder.remark;
});
},
this.errorDetail = mOrder.remark;
console.log(corpOrderId + " " + mOrder + " " + mOrder.remark);
this.dialogVisible = true;
},
handleErrorDetail(poistion) {
var mOrder = this.list[poistion];
var corpOrderId = mOrder.remark;
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery.id = row.id;
},
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {
});
},
geActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
this.errorDetail = mOrder.remark;
console.log(corpOrderId + " " + mOrder + " " + mOrder.remark);
this.dialogVisible = true;
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "danger",
};
return statusMap[status];
},
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery.id = row.id;
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {
});
},
created() {
//
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
//
this.getList();
this.getBusType();
geActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "danger",
};
return statusMap[status];
},
};
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
//
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
//
this.getList();
this.getBusType();
},
};
</script>
<style type="text/scss" lang="scss">

@ -212,6 +212,7 @@
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef'
placeholder="请输入批次号" style="width: 80%"></el-input>
</template>

Loading…
Cancel
Save