1.修复部分bug

purchase
x_z 3 years ago
parent 5fe9c76d1b
commit e062765db5

@ -504,7 +504,7 @@ export default {
this.getList(); this.getList();
}, },
detailHandleCurrentChange(val) { detailHandleCurrentChange(val) {
this.query.page = val; this.detailQuery.page = val;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
}, },
// //

@ -634,6 +634,7 @@ export default {
}; };
this.getList(); this.getList();
this.detailList = []; this.detailList = [];
this.detailTotal = 0;
this.haveDistributionVisible = false; this.haveDistributionVisible = false;
this.actDateRange = []; this.actDateRange = [];
}, },
@ -658,7 +659,7 @@ export default {
this.getList(); this.getList();
}, },
detailHandleCurrentChange(val) { detailHandleCurrentChange(val) {
this.query.page = val; this.detailQuery.page = val;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
}, },
// //

@ -613,7 +613,7 @@ export default {
this.getList(); this.getList();
}, },
detailHandleCurrentChange(val) { detailHandleCurrentChange(val) {
this.query.page = val; this.detailQuery.page = val;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
}, },
// //

@ -1,200 +1,206 @@
<template> <template>
<div> <div>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="query.code" placeholder="搜索"></el-input> <el-input v-model="query.code" placeholder="搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<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="deleteDialog" >
>删除</el-button <el-button type="primary" icon="search" @click="deleteDialog"
> >删除
</el-button-group> </el-button
</el-form-item> >
</el-form> </el-button-group>
<el-table </el-form-item>
v-loading="loading" </el-form>
:data="codeArry" <el-table
style="width: 100%" v-loading="loading"
ref="multipleTable" :data="codeArry"
tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange" ref="multipleTable"
> tooltip-effect="dark"
<el-table-column type="selection" width="55"></el-table-column> @selection-change="handleSelectionChange"
<el-table-column label="序号" type="index" fixed></el-table-column> >
<!-- <el-table-column label="ID" prop="id" fixed></el-table-column> --> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="条码" prop="code" fixed></el-table-column> <el-table-column label="序号" type="index" fixed></el-table-column>
<el-table-column <!-- <el-table-column label="ID" prop="id" fixed></el-table-column> -->
label="扫码数量" <el-table-column label="条码" prop="code" fixed></el-table-column>
prop="count" <el-table-column
width="220" label="扫码数量"
show-overflow-tooltip prop="count"
></el-table-column> width="220"
<el-table-column label="创建时间" prop="actDate" > show-overflow-tooltip
<template slot-scope="scope"> ></el-table-column>
<i class="el-icon-time"></i> <el-table-column label="创建时间" prop="actDate">
<span>{{ scope.row.actDate }}</span> <template slot-scope="scope">
</template> <i class="el-icon-time"></i>
</el-table-column> <span>{{ scope.row.actDate }}</span>
</el-table> </template>
</el-table-column>
</el-table>
<el-pagination <el-pagination
:page-size="query.limit" :page-size="query.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
:current-page="query.page" :current-page="query.page"
></el-pagination> ></el-pagination>
</div> </div>
</template> </template>
<script> <script>
import { import {
orderList, orderList,
errorCodeList, errorCodeList,
deleteCodes, deleteCodes,
} from "../../api/inout/order"; } from "../../api/inout/order";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { saveAs } from "file-saver"; import {saveAs} from "file-saver";
export default { export default {
name: "idQuery", name: "idQuery",
props: { props: {
idQuery: { idQuery: {
type: Object, type: Object,
required: true, required: true,
},
}, },
}, data() {
data() { return {
return { query: {
query: { code: "",
code: "", corpOrderId: "",
corpOrderId: "", page: 1,
page: 1, limit: 20,
limit: 20, },
}, codeArry: [],
codeArry: [], total: 0,
total: 0, loading: true,
loading: true, index: null,
index: null, formLoading: false,
formLoading: false, formVisible: false,
formVisible: false, deleteLoading: false,
deleteLoading: false, orderNo: null,
orderNo: null, multipleSelection: [],
multipleSelection: [], };
};
},
components: {
draggable,
},
methods: {
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
}, },
components: {
onReset() { draggable,
this.$router.push({
path: "",
});
this.query = {
code: "",
corpOrderId: "",
page: 1,
limit: 20,
};
this.getCodeList();
},
onSubmit() {
this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
}, },
methods: {
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
},
deleteDialog() { onReset() {
this.$confirm("是否删除所选条码?", "提示", { this.$router.push({
confirmButtonText: "确定", path: "",
cancelButtonText: "取消", });
type: "warning", this.query = {
}) code: "",
.then(() => { corpOrderId: "",
this.onDelete(); page: 1,
}) limit: 20,
.catch(() => {}); };
}, this.getCodeList();
},
onSubmit() {
this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
onDelete() { deleteDialog() {
var selectData = this.multipleSelection; if (this.multipleSelection.length < 1) {
this.$message.error("请选择需要删除的条码!")
return;
}
this.$confirm("是否删除所选条码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.onDelete();
})
.catch(() => {
});
},
var codeList = []; onDelete() {
selectData.forEach((obj, index) => { var selectData = this.multipleSelection;
codeList.push(obj.id); var codeList = [];
}); selectData.forEach((obj, index) => {
var tquery = { codeList.push(obj.id);
codes: codeList, });
}; var tquery = {
deleteCodes(tquery).then((response) => { codes: codeList,
this.getCodeList(); };
this.$message({ deleteCodes(tquery).then((response) => {
type: "success", this.getCodeList();
message: "删除成功!", this.$message({
}); type: "success",
}); message: "删除成功!",
}, });
});
},
getCodeList() { getCodeList() {
this.loading = true; this.loading = true;
this.query.orderId = this.idQuery.id; this.query.orderId = this.idQuery.id;
errorCodeList(this.query) // errorCodeList(this.query) //
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.codeArry = response.data.list || []; this.codeArry = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
},
intentBack() {
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}});
this.$router.go(-1);
},
}, },
intentBack() { filters: {},
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}}); mounted() {
this.$router.go(-1); document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}, },
}, created() {
filters: {}, //
mounted() { let query = this.$route.query;
document.body.ondrop = function (event) { this.orderNo = query.id;
event.preventDefault();
event.stopPropagation();
};
},
created() {
//
let query = this.$route.query;
this.orderNo = query.id;
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
this.query.corpOrderId = query.id; this.query.corpOrderId = query.id;
// //
this.getCodeList(); this.getCodeList();
}, },
}; };
</script> </script>

@ -121,6 +121,8 @@
:visible.sync="codeDetailVisible" :visible.sync="codeDetailVisible"
width="85%" width="85%"
v-if="codeDetailVisible" v-if="codeDetailVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
> >
<codeDetail <codeDetail
:idQuery="idQuery" :idQuery="idQuery"

@ -517,7 +517,6 @@ export default {
}); });
}, },
storageChange(row) { storageChange(row) {
console.log(row);
this.formData.corpId = row.code; this.formData.corpId = row.code;
this.formData.corpName = row.name; this.formData.corpName = row.name;
}, },
@ -565,7 +564,6 @@ export default {
tQuery.editStatus = status; tQuery.editStatus = status;
tQuery.subErpOrders = this.codeArray; tQuery.subErpOrders = this.codeArray;
// tQuery.billType = this.formData.bi; // tQuery.billType = this.formData.bi;
console.log(tQuery);
inserThrOrderWeb(tQuery) inserThrOrderWeb(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
@ -631,7 +629,6 @@ export default {
rData.forEach((obj, index) => { rData.forEach((obj, index) => {
this.codeArray.unshift(obj); this.codeArray.unshift(obj);
}); });
console.log(this.codeArray);
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
this.currentRow = this.codeArray[0]; this.currentRow = this.codeArray[0];
this.selectedIndex = 0; this.selectedIndex = 0;
@ -855,7 +852,6 @@ export default {
this.loading = true; this.loading = true;
getThrOrderDetails(this.query) // getThrOrderDetails(this.query) //
.then((response) => { .then((response) => {
console.log(response)
this.codeArray = response.data.list || []; this.codeArray = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
this.loading = false; this.loading = false;
@ -889,7 +885,6 @@ export default {
this.formData.unitIdFk = event.erpId; this.formData.unitIdFk = event.erpId;
}, },
findMethod(query) { findMethod(query) {
console.log(query);
this.fromOptions = []; this.fromOptions = [];
let cQuery = { let cQuery = {
key: query, key: query,
@ -932,7 +927,6 @@ export default {
} }
}, },
actionChange(item) { actionChange(item) {
console.log(item);
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);
this.locInChange(); this.locInChange();
this.findMethod(); this.findMethod();

Loading…
Cancel
Save