|
@@ -1,14 +1,12 @@
|
|
|
<template>
|
|
|
- <div class="box"
|
|
|
-
|
|
|
- >
|
|
|
- <div class="tableBox" v-if="
|
|
|
- powers && powers.length > 0 && powers.some((item) => item == '001')
|
|
|
- ">
|
|
|
+ <div class="box">
|
|
|
+ <div
|
|
|
+ class="tableBox"
|
|
|
+ v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
|
|
|
+ >
|
|
|
<ex-table
|
|
|
ref="multipleTable"
|
|
|
v-loading="loading"
|
|
|
-
|
|
|
:table="table"
|
|
|
:data="tableData"
|
|
|
:columns="columns"
|
|
@@ -28,23 +26,13 @@
|
|
|
"
|
|
|
@selection="selection_change"
|
|
|
><template #table-header="{}">
|
|
|
- <div class="searchBox" style="width:100%">
|
|
|
- <el-button
|
|
|
-
|
|
|
- class="btn entry"
|
|
|
- @click="entry"
|
|
|
- size="mini"
|
|
|
- >订单导入</el-button
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="parmValue"
|
|
|
-
|
|
|
- size="medium "
|
|
|
- class="form"
|
|
|
+ <div class="searchBox" style="width: 100%">
|
|
|
+ <el-button class="btn entry" @click="entry" size="mini"
|
|
|
+ >订单导入</el-button
|
|
|
>
|
|
|
+ <el-form ref="form" :model="parmValue" size="medium " class="form">
|
|
|
<el-row :gutter="10">
|
|
|
- <el-col :span="8" style="width: 373px">
|
|
|
+ <el-col :span="8" style="width: 373px">
|
|
|
<el-form-item>
|
|
|
<periodDatePickerActive
|
|
|
:start="parmValue.platform_time_start"
|
|
@@ -56,12 +44,8 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width:160px">
|
|
|
- <el-form-item
|
|
|
-
|
|
|
- prop="status"
|
|
|
-
|
|
|
- >
|
|
|
+ <el-col :span="4" style="width: 160px">
|
|
|
+ <el-form-item prop="status">
|
|
|
<el-select
|
|
|
@change="
|
|
|
pageInfo.curr = 1;
|
|
@@ -82,12 +66,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6" style="width:160px">
|
|
|
- <el-form-item
|
|
|
-
|
|
|
- prop="platform_code"
|
|
|
-
|
|
|
- >
|
|
|
+ <el-col :span="6" style="width: 160px">
|
|
|
+ <el-form-item prop="platform_code">
|
|
|
<el-input
|
|
|
v-model="parmValue.platform_code"
|
|
|
@blur="
|
|
@@ -99,8 +79,12 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="3" class="fr" style="width:140px;margin-left: auto;">
|
|
|
+
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ class="fr"
|
|
|
+ style="width: 140px; margin-left: auto"
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
@@ -110,7 +94,7 @@
|
|
|
>批量关联库存</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
- <el-col :span="3" class="fr" style="width:66px">
|
|
|
+ <el-col :span="3" class="fr" style="width: 66px">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
@@ -122,18 +106,11 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="parmValue"
|
|
|
-
|
|
|
- size="medium "
|
|
|
- class="form"
|
|
|
- >
|
|
|
+ <el-form ref="form" :model="parmValue" size="medium " class="form">
|
|
|
<el-row :gutter="10">
|
|
|
- <el-col :span="8" style="width: 373px">
|
|
|
- <el-form-item >
|
|
|
- <periodDatePickerActive
|
|
|
-
|
|
|
+ <el-col :span="8" style="width: 373px">
|
|
|
+ <el-form-item>
|
|
|
+ <periodDatePickerActive
|
|
|
:start="parmValue.addtime_start"
|
|
|
:end="parmValue.addtime_end"
|
|
|
:placeholder="'导入'"
|
|
@@ -143,12 +120,8 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width:160px">
|
|
|
- <el-form-item
|
|
|
-
|
|
|
- prop="po_code"
|
|
|
-
|
|
|
- >
|
|
|
+ <el-col :span="4" style="width: 160px">
|
|
|
+ <el-form-item prop="po_code">
|
|
|
<el-input
|
|
|
v-model="parmValue.po_code"
|
|
|
@blur="
|
|
@@ -160,12 +133,8 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6" style="width:160px">
|
|
|
- <el-form-item
|
|
|
-
|
|
|
- prop="plat_code"
|
|
|
-
|
|
|
- >
|
|
|
+ <el-col :span="6" style="width: 160px">
|
|
|
+ <el-form-item prop="plat_code">
|
|
|
<el-input
|
|
|
v-model="parmValue.plat_code"
|
|
|
@blur="
|
|
@@ -177,8 +146,12 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="3" class="fr" style="width:140px;margin-left: auto;">
|
|
|
+
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ class="fr"
|
|
|
+ style="width: 140px; margin-left: auto"
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
icon="el-icon-download"
|
|
@@ -189,7 +162,7 @@
|
|
|
></el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
- <el-col :span="3" class="fr" style="width:66px">
|
|
|
+ <el-col :span="3" class="fr" style="width: 66px">
|
|
|
<el-button
|
|
|
icon="el-icon-refresh-right"
|
|
|
class="btn"
|
|
@@ -202,6 +175,9 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #statusTxt="{ scope }">
|
|
|
+ <span>{{ statusActive(scope.row.status)}}</span>
|
|
|
+ </template>
|
|
|
<template #operation="{ scope }">
|
|
|
<el-tooltip
|
|
|
v-if="powers.some((item) => item == '007')"
|
|
@@ -243,11 +219,11 @@ import { mapGetters } from "vuex";
|
|
|
import asyncRequest from "@/apis/service/orderEntry/orderEnter";
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import periodDatePickerActive from "./period-date-picker/main.vue"
|
|
|
+import periodDatePickerActive from "./period-date-picker/main.vue";
|
|
|
export default {
|
|
|
mixins: [mixinPage, resToken],
|
|
|
- components:{
|
|
|
- periodDatePickerActive
|
|
|
+ components: {
|
|
|
+ periodDatePickerActive,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -305,6 +281,29 @@ export default {
|
|
|
return [];
|
|
|
}
|
|
|
},
|
|
|
+ statusActive() {
|
|
|
+ return function (status) {
|
|
|
+ let active = "";
|
|
|
+ switch (status) {
|
|
|
+ case "1":
|
|
|
+ active = "系统验证数据中";
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ active = "待确认订单信息";
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ active = "待处理(待扣减库存)";
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ active = "库存不足";
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ active = "订单录入成功";
|
|
|
+ break;;
|
|
|
+ }
|
|
|
+ return active;
|
|
|
+ };
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.tableData = [];
|
|
@@ -363,7 +362,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let flag = false;
|
|
|
- try {
|
|
|
+ try {
|
|
|
this.changeList.forEach((item, index) => {
|
|
|
if (item.status == "4") {
|
|
|
if (item.plat_code == this.changeList[0].plat_code) {
|
|
@@ -379,45 +378,38 @@ export default {
|
|
|
}
|
|
|
flag = true;
|
|
|
});
|
|
|
-
|
|
|
} catch {}
|
|
|
- console.log("判断函数",flag)
|
|
|
- return flag
|
|
|
+ console.log("判断函数", flag);
|
|
|
+ return flag;
|
|
|
},
|
|
|
|
|
|
//批量关联库存
|
|
|
async selectStock() {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if (!this.selectStockIf()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
let ids = [];
|
|
|
let plat_code = this.changeList[0].plat_code;
|
|
|
- this.changeList.forEach((item)=>{
|
|
|
- ids.push(item.id)
|
|
|
- })
|
|
|
+ this.changeList.forEach((item) => {
|
|
|
+ ids.push(item.id);
|
|
|
+ });
|
|
|
let model = {
|
|
|
ids,
|
|
|
- plat_code
|
|
|
+ plat_code,
|
|
|
};
|
|
|
let res = await asyncRequest.relationstockbatch(model);
|
|
|
if (res && res.code === 0) {
|
|
|
- console.log(res)
|
|
|
+ console.log(res);
|
|
|
this.$message.success(res.message);
|
|
|
- this.searchList()
|
|
|
+ this.searchList();
|
|
|
//成功展示弹窗
|
|
|
// this.centerDialogVisible = true;
|
|
|
-
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.$message.warning(res.message);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
//重置按钮
|
|
|
reset() {
|
|
@@ -449,8 +441,8 @@ export default {
|
|
|
this.searchList();
|
|
|
},
|
|
|
//订单导入入口
|
|
|
- entry(){
|
|
|
- this.$router.push("/orderEntry/orderImport")
|
|
|
+ entry() {
|
|
|
+ this.$router.push("/orderEntry/orderImport");
|
|
|
},
|
|
|
|
|
|
//选中触发函数
|
|
@@ -498,18 +490,18 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
// float: right;
|
|
|
-
|
|
|
}
|
|
|
.tableBox {
|
|
|
width: 100%;
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
-.entry{
|
|
|
+.entry {
|
|
|
position: absolute;
|
|
|
top: 69px;
|
|
|
left: -1px;
|
|
|
}
|
|
|
-/deep/ .el-dropdown-selfdefine ,.entry {
|
|
|
+/deep/ .el-dropdown-selfdefine,
|
|
|
+.entry {
|
|
|
background: #63cbe7;
|
|
|
color: #fff;
|
|
|
font-weight: bold;
|