bug修复

fengcang
anthonyywj2 3 years ago
parent 5a0d441e83
commit d927096374

@ -255,7 +255,7 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="count"> <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-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">

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

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

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

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

@ -347,7 +347,7 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="count"> <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-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">

@ -235,7 +235,8 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="count"> <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-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -343,11 +344,11 @@
<script> <script>
import { import {
stockOrderList, stockOrderDetail, stockOrderList, stockOrderDetail,
deleteStockOrderById, deleteStockOrderDetailById, deleteStockOrderById, deleteStockOrderDetailById,
copyStockOrderDetail, submitStockOrder, copyStockOrderDetail, submitStockOrder,
uploadStockOrderDetail, uploadStockOrderDetailCount, uploadStockOrderDetail, uploadStockOrderDetailCount,
generateStockOrderQRCodeText, updateStockOrder generateStockOrderQRCodeText, updateStockOrder
} from "../../api/inout/stockOrder"; } from "../../api/inout/stockOrder";
import {BASE_URL} from "../../config/app"; import {BASE_URL} from "../../config/app";
import stockOrderDistribution from "./stockOrderDistribution"; import stockOrderDistribution from "./stockOrderDistribution";

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

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

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

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

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

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

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

Loading…
Cancel
Save