|
@@ -12,6 +12,7 @@
|
|
|
:size="size"
|
|
|
@page-curr-change="handlePageChange"
|
|
|
@page-size-change="handleSizeChange"
|
|
|
+ @RowClick="RowClick"
|
|
|
@screen-reset="
|
|
|
pageInfo.curr = 1;
|
|
|
parmValue.page = 1;
|
|
@@ -27,13 +28,23 @@
|
|
|
<div style="width: 100%">
|
|
|
<el-row style="padding: 0 0 0 80px">
|
|
|
<el-col :span="24">
|
|
|
- <el-col :span="4" style="width: 120px">
|
|
|
+ <el-col :span="6" style="width: 292px">
|
|
|
+ <period-date-picker
|
|
|
+ :start="parmValue.start"
|
|
|
+ :end="parmValue.end"
|
|
|
+ :type="1"
|
|
|
+ :width="'135px'"
|
|
|
+ :size="searchSize"
|
|
|
+ @timeReturned="timeReturned($event)"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" style="width: 180px; padding: 0 0 0 10px">
|
|
|
<el-select
|
|
|
:size="searchSize"
|
|
|
v-model="parmValue.status"
|
|
|
filterable
|
|
|
clearable
|
|
|
- placeholder="账号状态"
|
|
|
+ placeholder="盘点状态"
|
|
|
style="width: 100%"
|
|
|
@change="
|
|
|
pageInfo.curr = 1;
|
|
@@ -42,27 +53,63 @@
|
|
|
"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in statusList"
|
|
|
- :key="'status' + item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
+ v-for="item in statusOptions"
|
|
|
+ :key="'status' + item.id"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
|
|
|
+ <el-col :span="4" style="width: 130px; padding: 0 0 0 10px">
|
|
|
+ <el-select
|
|
|
+ :size="searchSize"
|
|
|
+ v-model="parmValue.type"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="盘点类型"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeOptions"
|
|
|
+ :key="'type' + item.id"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" style="width: 66px; float: right">
|
|
|
+ <el-button
|
|
|
+ :size="searchSize"
|
|
|
+ type="primary"
|
|
|
+ style="float: right; margin-left: 5px"
|
|
|
+ @click="searchList"
|
|
|
+ >
|
|
|
+ 刷新
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="padding: 10px 0 0 0">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-col :span="4" style="width: 260px">
|
|
|
<el-input
|
|
|
:size="searchSize"
|
|
|
- v-model="parmValue.name"
|
|
|
+ v-model="parmValue.wsm_code"
|
|
|
:maxlength="40"
|
|
|
- placeholder="业务员姓名"
|
|
|
+ placeholder="仓库编号"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
|
|
|
+ <el-col :span="4" style="width: 250px; padding: 0 0 0 10px">
|
|
|
<el-input
|
|
|
:size="searchSize"
|
|
|
- v-model="parmValue.username"
|
|
|
+ v-model="parmValue.check_code"
|
|
|
:maxlength="40"
|
|
|
- placeholder="手机号"
|
|
|
+ placeholder="盘点编号"
|
|
|
/>
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="width: 54px">
|
|
@@ -83,16 +130,6 @@
|
|
|
重置
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="3" style="width: 66px; float: right">
|
|
|
- <el-button
|
|
|
- :size="searchSize"
|
|
|
- type="primary"
|
|
|
- style="float: right; margin-left: 5px"
|
|
|
- @click="searchList"
|
|
|
- >
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
<el-col
|
|
|
:span="3"
|
|
|
style="width: 66px; float: right"
|
|
@@ -121,68 +158,6 @@
|
|
|
"
|
|
|
></el-tag>
|
|
|
</template>
|
|
|
- <template #operation="{ scope }">
|
|
|
- <el-tooltip
|
|
|
- v-if="powers.some((item) => item == '002')"
|
|
|
- effect="dark"
|
|
|
- content="重置密码"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-refresh-left tb-icon"
|
|
|
- @click="openPasswordModal(scope.row.id, false)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
- <el-tooltip
|
|
|
- v-if="powers.some((item) => item == '007')"
|
|
|
- effect="dark"
|
|
|
- content="详情"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-view tb-icon"
|
|
|
- @click="openModal(scope.row.id, true, scope.row)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- v-if="powers.some((item) => item == '005')"
|
|
|
- effect="dark"
|
|
|
- content="修改"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-edit tb-icon"
|
|
|
- @click="openModal(scope.row.id, false, scope.row)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- v-if="
|
|
|
- powers.some((item) => item == '004') && scope.row.status === '1'
|
|
|
- "
|
|
|
- effect="dark"
|
|
|
- content="禁用"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-video-pause tb-icon"
|
|
|
- @click="statusConfirm(scope.row.id, scope.row.status)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- v-if="
|
|
|
- powers.some((item) => item == '004') && scope.row.status === '0'
|
|
|
- "
|
|
|
- effect="dark"
|
|
|
- content="启用"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-video-play tb-icon"
|
|
|
- @click="statusConfirm(scope.row.id, scope.row.status)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
</ex-table>
|
|
|
<add-model
|
|
|
:id="modelId"
|
|
@@ -201,7 +176,6 @@
|
|
|
<script>
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import statusList from "@/assets/js/statusList";
|
|
|
import asyncRequest from "@/apis/service/stock/check";
|
|
|
import addModel from "./addModel";
|
|
|
import { mapGetters } from "vuex";
|
|
@@ -213,7 +187,7 @@ export default {
|
|
|
addModel,
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
+ ...mapGetters(["tablebtnSize", "searchSize", "size", "visitedViews"]),
|
|
|
powers() {
|
|
|
let tran =
|
|
|
this.$store.getters.btnList.find(
|
|
@@ -229,22 +203,32 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
sitem: null,
|
|
|
- // 状态
|
|
|
+ // 节点状态
|
|
|
statusOptions: [
|
|
|
- { id: "0", label: "禁用" },
|
|
|
- { id: "1", label: "启用" },
|
|
|
+ { id: "0", label: "待发起流程" },
|
|
|
+ { id: "1", label: "待上传盘点结果" },
|
|
|
+ { id: "2", label: "待审核盘点结果" },
|
|
|
+ { id: "3", label: "待系统更新" },
|
|
|
+ { id: "4", label: "盘点已结束" },
|
|
|
+ ],
|
|
|
+ // 盘点类型
|
|
|
+ typeOptions: [
|
|
|
+ { id: "1", label: "全盘" },
|
|
|
+ { id: "2", label: "抽盘" },
|
|
|
],
|
|
|
- statusList: statusList,
|
|
|
loading: true,
|
|
|
showModel: false,
|
|
|
isDetail: false,
|
|
|
modelId: 0,
|
|
|
parmValue: {
|
|
|
- name: "", // 业务员名字
|
|
|
- username: "", // 账号
|
|
|
- status: "", //
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
+ wsm_code: "", // 盘点仓库
|
|
|
+ check_code: "", // 盘点编号
|
|
|
+ type: "", //盘点类型
|
|
|
+ status: "", //判断状态
|
|
|
+ start: "",
|
|
|
+ end: "",
|
|
|
},
|
|
|
tableData: [],
|
|
|
passwordModel: false,
|
|
@@ -271,34 +255,34 @@ export default {
|
|
|
label: "盘点编号",
|
|
|
},
|
|
|
{
|
|
|
- prop: "role_name",
|
|
|
- label: "角色名称",
|
|
|
+ prop: "wsm_code",
|
|
|
+ label: "仓库编码",
|
|
|
+ width: "170px",
|
|
|
},
|
|
|
{
|
|
|
- prop: "mobile",
|
|
|
- label: "联系电话",
|
|
|
+ prop: "name",
|
|
|
+ label: "仓库名称",
|
|
|
},
|
|
|
{
|
|
|
- prop: "email",
|
|
|
- label: "邮箱",
|
|
|
+ prop: "code",
|
|
|
+ label: "公司编码",
|
|
|
+ width: "140px",
|
|
|
},
|
|
|
{
|
|
|
- prop: "status",
|
|
|
- label: "状态",
|
|
|
- _slot_: "status",
|
|
|
- width: "80px",
|
|
|
+ prop: "caname",
|
|
|
+ label: "公司名称",
|
|
|
},
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: "status",
|
|
|
+ // label: "状态",
|
|
|
+ // _slot_: "status",
|
|
|
+ // width: "80px",
|
|
|
+ // },
|
|
|
{
|
|
|
prop: "addtime",
|
|
|
label: "创建时间",
|
|
|
- sortable: true,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "",
|
|
|
- label: "操作",
|
|
|
- fixed: "right",
|
|
|
- _noset_: true,
|
|
|
- _slot_: "operation",
|
|
|
+ width: "140px",
|
|
|
},
|
|
|
],
|
|
|
};
|
|
@@ -310,9 +294,12 @@ export default {
|
|
|
methods: {
|
|
|
restSearch() {
|
|
|
this.parmValue = {
|
|
|
- name: "", // 业务员名字
|
|
|
- username: "", // 账号
|
|
|
- status: "", //
|
|
|
+ wsm_code: "", // 盘点仓库
|
|
|
+ check_code: "", // 盘点编号
|
|
|
+ type: "", //盘点类型
|
|
|
+ status: "", //判断状态
|
|
|
+ start: "",
|
|
|
+ end: "",
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
};
|
|
@@ -325,35 +312,32 @@ export default {
|
|
|
this.isDetail = isDetail;
|
|
|
this.sitem = sitem;
|
|
|
},
|
|
|
- async deleteById(id, status) {
|
|
|
- // await this.$confirm("确定要删除?", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning",
|
|
|
- // })
|
|
|
- // .then(async () => {
|
|
|
- // const model = {
|
|
|
- // id: id,
|
|
|
- // status: status === "1" ? "0" : "1",
|
|
|
- // };
|
|
|
- // const res = await asyncRequest.status(model);
|
|
|
- // if (res && res.code === 0) {
|
|
|
- // this.$notify.success({
|
|
|
- // title: "删除成功",
|
|
|
- // message: "",
|
|
|
- // });
|
|
|
- // this.searchList();
|
|
|
- // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- // await this.logout();
|
|
|
- // } else {
|
|
|
- // this.$message.warning(res.message);
|
|
|
- // }
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // console.log("取消");
|
|
|
- // });
|
|
|
+ async timeReturned(e) {
|
|
|
+ if (e.startTime !== "") {
|
|
|
+ this.parmValue.start = e.startTime;
|
|
|
+ } else {
|
|
|
+ this.parmValue.start = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (e.endTime !== "") {
|
|
|
+ this.parmValue.end = e.endTime;
|
|
|
+ } else {
|
|
|
+ this.parmValue.end = "";
|
|
|
+ }
|
|
|
+ if (this.parmValue.start !== "" && this.parmValue.end !== "") {
|
|
|
+ this.parmValue.page = 1;
|
|
|
+ await this.searchList();
|
|
|
+ }
|
|
|
},
|
|
|
async searchList() {
|
|
|
+ if (
|
|
|
+ (this.parmValue.start !== "" && this.parmValue.end === "") ||
|
|
|
+ (this.parmValue.start === "" && this.parmValue.end !== "")
|
|
|
+ ) {
|
|
|
+ this.$message.warning("时间区间不完整!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
this.loading = true;
|
|
|
const res = await asyncRequest.list(this.parmValue);
|
|
|
if (res && res.code === 0 && res.data) {
|
|
@@ -367,37 +351,37 @@ export default {
|
|
|
}
|
|
|
this.loading = false;
|
|
|
},
|
|
|
+ async RowClick(e) {
|
|
|
+ let path = "checkDetail";
|
|
|
+ let index = this.visitedViews.findIndex((v) => v.name === path);
|
|
|
+ if (index !== -1) {
|
|
|
+ await this.$confirm("当前已打开盘点详情页,是否关闭?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ this.$store
|
|
|
+ .dispatch("tagsView/delView", this.visitedViews[index])
|
|
|
+ .then(() => {
|
|
|
+ this.gotoDetail(path, e.id);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ console.log("取消");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.gotoDetail(path, e.id);
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- async statusConfirm(id, status) {
|
|
|
- // let str = status === "1" ? "禁用" : "启用";
|
|
|
- // await this.$confirm("确定要改为" + str + "?", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning",
|
|
|
- // })
|
|
|
- // .then(async () => {
|
|
|
- // this.loading = true;
|
|
|
- // const model = {
|
|
|
- // id: id,
|
|
|
- // status: status === "1" ? "0" : "1",
|
|
|
- // };
|
|
|
- // const res = await asyncRequest.status(model);
|
|
|
- // if (res && res.code === 0) {
|
|
|
- // this.loading = false;
|
|
|
- // this.$notify.success({
|
|
|
- // title: "状态修改成功!",
|
|
|
- // message: "",
|
|
|
- // });
|
|
|
- // await this.searchList();
|
|
|
- // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- // await this.logout();
|
|
|
- // } else {
|
|
|
- // this.$message.warning(res.message);
|
|
|
- // }
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // console.log("取消");
|
|
|
- // });
|
|
|
+ gotoDetail(path, id) {
|
|
|
+ window.vm.$router.push({
|
|
|
+ path: path,
|
|
|
+ query: {
|
|
|
+ id: id,
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|