|
@@ -28,61 +28,37 @@
|
|
|
<div style="width: 100%" class="min">
|
|
|
<el-row style="padding: 0 0 0 80px">
|
|
|
<el-col :span="24">
|
|
|
- <!-- 库存量/仓库搜索二合一 -->
|
|
|
- <el-col :span="18" style="width: 500px; padding: 0">
|
|
|
- <el-input
|
|
|
- placeholder="关键字"
|
|
|
- v-model="input"
|
|
|
+ <!-- 供应商选择 -->
|
|
|
+ <el-col :span="12" style="width: 300px; padding: 0">
|
|
|
+ <search-supplier
|
|
|
:size="searchSize"
|
|
|
- class="input-with-select"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="select"
|
|
|
- slot="prepend"
|
|
|
- style="width: 125px"
|
|
|
- placeholder="请选择类型"
|
|
|
- >
|
|
|
- <el-option label="仓库编码" value="1"></el-option>
|
|
|
- <el-option label="库存量" value="2"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-button
|
|
|
- slot="append"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="searchList"
|
|
|
- ></el-button>
|
|
|
- </el-input>
|
|
|
+ :placeholder="'请选择供应商公司'"
|
|
|
+ :value="parmValue.supplier_code"
|
|
|
+ @searchChange="selectSupplier"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="6" style="width: 273px; padding: 0 0 0 10px">
|
|
|
- <number-range
|
|
|
- :start="parmValue.total_low"
|
|
|
- :end="parmValue.total_up"
|
|
|
- :type="1"
|
|
|
- :width="'120px'"
|
|
|
- :title="'库存量'"
|
|
|
+ <el-col :span="12" style="width: 200px; padding-left: 10px">
|
|
|
+ <search-stock
|
|
|
+ :isDetail="true"
|
|
|
:size="searchSize"
|
|
|
- @numReturned="numReturned($event, 0)"
|
|
|
+ :value="parmValue.stock_code"
|
|
|
+ :disabled="isDisabled"
|
|
|
+ :placeholder="'请选择出口仓库'"
|
|
|
+ :isRelation="true"
|
|
|
+ :companyCode="supplier_code"
|
|
|
+ :names="''"
|
|
|
+ @searchChange="selectStock"
|
|
|
/>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <!-- 预警库存量 -->
|
|
|
- <el-col :span="6" style="width: 303px" class="mr10">
|
|
|
- <number-range
|
|
|
- :start="parmValue.total_low"
|
|
|
- :end="parmValue.total_up"
|
|
|
- :type="1"
|
|
|
- :width="'135px'"
|
|
|
- :title="'预警量'"
|
|
|
+ <el-col style="width: 200px; padding-left: 10px">
|
|
|
+ <el-input
|
|
|
+ :disabled="is_disabled"
|
|
|
+ placeholder="请输入商品编码"
|
|
|
:size="searchSize"
|
|
|
- @numReturned="numReturned($event, 0)"
|
|
|
+ v-model="parmValue.goods_sn"
|
|
|
/>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col
|
|
|
- :span="4"
|
|
|
- style="width: 54px; margin-left: 10px"
|
|
|
- class="mr5"
|
|
|
- >
|
|
|
+ <el-col :span="4" style="width: 54px; margin-left: 10px">
|
|
|
<el-button
|
|
|
:size="searchSize"
|
|
|
class="fr"
|
|
@@ -91,11 +67,55 @@
|
|
|
>重置</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
+ <el-col :span="3" style="width: 56px; float: right">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :size="searchSize"
|
|
|
+ style="float: right; margin-left: 5px"
|
|
|
+ @click="searchList"
|
|
|
+ >
|
|
|
+ 刷新
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6" style="width: 273px; padding: 10px 0 0 0px">
|
|
|
+ <num-ber-range
|
|
|
+ :lower="parmValue.stock_num_low"
|
|
|
+ :online="parmValue.stock_num_up"
|
|
|
+ :title="'库存量'"
|
|
|
+ :width="'120px'"
|
|
|
+ :size="searchSize"
|
|
|
+ @numReturned="numReturned($event, 0)"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="width: 303px; padding-top: 10px">
|
|
|
+ <num-ber-range
|
|
|
+ :lower="parmValue.warn_num_low"
|
|
|
+ :online="parmValue.warn_num_up"
|
|
|
+ :width="'135px'"
|
|
|
+ :title="'预警量'"
|
|
|
+ :size="searchSize"
|
|
|
+ @numReturned="numReturned1($event, 0)"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <!--搜索按钮 -->
|
|
|
+ <el-col :span="4" style="width: 44px; padding-top: 10px">
|
|
|
+ <el-button
|
|
|
+ style="width: 100%"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ :size="searchSize"
|
|
|
+ @click="searchList"
|
|
|
+ >
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ {{ parmValue }}1{{ supplier_code }}
|
|
|
</div>
|
|
|
</template>
|
|
|
- <!-- <template #status="{ scope }">
|
|
|
+ <template #status="{ scope }">
|
|
|
<el-tag
|
|
|
:size="tablebtnSize"
|
|
|
:type="scope.row.status == '0' ? 'warning' : ''"
|
|
@@ -104,7 +124,7 @@
|
|
|
.label || '--'
|
|
|
"
|
|
|
></el-tag>
|
|
|
- </template> -->
|
|
|
+ </template>
|
|
|
<template #operation="{ scope }">
|
|
|
<el-tooltip
|
|
|
v-if="powers.some((item) => item == '005')"
|
|
@@ -164,7 +184,6 @@ import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import statusList from "@/assets/js/statusList";
|
|
|
import asyncRequest from "@/apis/service/stock/stockWarning";
|
|
|
-// import asyncRequest from "@/mock/service/stock/stockWarning";
|
|
|
import colums from "./colums";
|
|
|
import addEdit from "./addEdit";
|
|
|
import { mapGetters } from "vuex";
|
|
@@ -190,33 +209,25 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- options: [],
|
|
|
- // stock: [
|
|
|
- // { id: "1", name: "自建仓" },
|
|
|
- // { id: "2", name: "自建仓" },
|
|
|
- // { id: "1", name: "部门仓" },
|
|
|
- // { id: "2", name: "部门仓" },
|
|
|
- // ],
|
|
|
- // sitem: null,
|
|
|
-
|
|
|
+ input: "WSMdr4w211019095958", //三合一输入框的内容
|
|
|
+ stockCode: "", //仓库名称
|
|
|
+ supplier_code: "", //供应商名称
|
|
|
+ isDisabled: true, //默认不能选仓库
|
|
|
+ is_disabled: true, //默认不能选商品编码
|
|
|
statusList: statusList,
|
|
|
loading: true,
|
|
|
showModel: false,
|
|
|
isDetail: false,
|
|
|
modelId: 0,
|
|
|
- row: "",
|
|
|
parmValue: {
|
|
|
- stock_sn: "", // 商品编码
|
|
|
- stock_start: 0, //库存量开始
|
|
|
- stock_end: 0, //库存量结束
|
|
|
- stockWarn_start: 0, //预警量开始
|
|
|
- stockWarn_end: 0, //预警量结束
|
|
|
- status: "", //
|
|
|
- page: 1, // 页码
|
|
|
- size: 15, // 每页显示条数
|
|
|
+ goods_sn: "", //商品编码
|
|
|
+ supplier_code: [], //供应商编码
|
|
|
+ stock_code: [], //仓库编码
|
|
|
+ warn_num_low: "", //预警库存下限
|
|
|
+ warn_num_up: "", //预警库存上限
|
|
|
+ stock_num_low: "", //库存量下限
|
|
|
+ stock_num_up: "", //库存上限
|
|
|
},
|
|
|
- tableData: [],
|
|
|
-
|
|
|
// 表格 - 数据
|
|
|
tableData: [],
|
|
|
// 表格 - 参数
|
|
@@ -233,22 +244,65 @@ export default {
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
columns: colums,
|
|
|
- // 状态
|
|
|
- // statusOptions: [
|
|
|
- // { id: "0", label: "禁用" },
|
|
|
- // { id: "1", label: "启用" },
|
|
|
- // ],
|
|
|
- // passwordModel: false,
|
|
|
- // passwordModelId: 0,
|
|
|
- // isPasswordDetail: false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.searchList();
|
|
|
- // this.stockName();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // 选择供应商仓库
|
|
|
+ selectStock(e) {
|
|
|
+ if (e && e.id) {
|
|
|
+ this.parmValue.stock_code = [e.code];
|
|
|
+ this.stockCode = e.code;
|
|
|
+ this.is_disabled = false;
|
|
|
+ } else {
|
|
|
+ this.parmValue.stock_code = [];
|
|
|
+ this.stock_code = "";
|
|
|
+ this.is_disabled = true;
|
|
|
+ this.parmValue.goods_sn = "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 选择供应商
|
|
|
+ selectSupplier(e) {
|
|
|
+ if (e && e.id) {
|
|
|
+ this.parmValue.supplier_code = [e.code];
|
|
|
+ this.supplier_code = e.code;
|
|
|
+ this.isDisabled = false;
|
|
|
+ } else {
|
|
|
+ console.log("asa");
|
|
|
+ this.parmValue.stock_code = [];
|
|
|
+ this.parmValue.goods_sn = "";
|
|
|
+ this.parmValue.supplier_code = [];
|
|
|
+ this.stock_code = "";
|
|
|
+ this.supplier_code = "";
|
|
|
+ this.is_disabled = true;
|
|
|
+ this.isDisabled = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 预警量范围框
|
|
|
+ numReturned1(e) {
|
|
|
+ if (e && e.lower != "" && e.online != "") {
|
|
|
+ this.parmValue.warn_num_low = e.lower;
|
|
|
+ this.parmValue.warn_num_up = e.online;
|
|
|
+ } else {
|
|
|
+ this.parmValue.warn_num_low = "0";
|
|
|
+ this.parmValue.warn_num_up = "0";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 库存量范围框
|
|
|
+ numReturned(e) {
|
|
|
+ if (e && e.lower != "" && e.online != "") {
|
|
|
+ this.parmValue.stock_num_low = e.lower;
|
|
|
+ this.parmValue.stock_num_up = e.online;
|
|
|
+ } else {
|
|
|
+ this.parmValue.stock_num_low = "0";
|
|
|
+ this.parmValue.stock_num_up = "0";
|
|
|
+ }
|
|
|
+ console.log(this.parmValue);
|
|
|
+ },
|
|
|
+ // 重置搜索栏
|
|
|
restSearch() {
|
|
|
// 表格 - 分页
|
|
|
this.pageInfo = {
|
|
@@ -256,13 +310,14 @@ export default {
|
|
|
curr: 1,
|
|
|
total: 0,
|
|
|
};
|
|
|
- this.input = "";
|
|
|
- this.select = "1";
|
|
|
- this.ruleForm = {
|
|
|
- supplier_code: [], //供应商名称
|
|
|
- stock_code: [], //仓库名称
|
|
|
- good_name: "", //产品名称
|
|
|
- warn_num: "", //预警数量
|
|
|
+ this.parmValue = {
|
|
|
+ goods_sn: "", //商品编码
|
|
|
+ supplier_code: [], //供应商编码
|
|
|
+ stock_code: [], //仓库编码
|
|
|
+ warn_num_low: "", //预警库存下限
|
|
|
+ warn_num_up: "", //预警库存上限
|
|
|
+ stock_num_low: "", //库存量下限
|
|
|
+ stock_num_up: "", //库存上限
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
@@ -278,10 +333,32 @@ export default {
|
|
|
|
|
|
async searchList() {
|
|
|
this.loading = true;
|
|
|
+ const {
|
|
|
+ supplier_code,
|
|
|
+ stock_code,
|
|
|
+ goods_sn,
|
|
|
+ stock_num_low,
|
|
|
+ stock_num_up,
|
|
|
+ warn_num_low,
|
|
|
+ warn_num_up,
|
|
|
+ } = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
+ console.log(this.ruleForm);
|
|
|
let model = {
|
|
|
- wsm_code: "WSMdr4w211019095958",
|
|
|
+ wsm_code: "", //WSMdr4w211019095958
|
|
|
+ // 缺少库存量上下限两个字段
|
|
|
+ // 缺少预警量上下限两个字段
|
|
|
+ supplier_code: supplier_code.toString() || "",
|
|
|
+ stock_code: stock_code.toString() || "",
|
|
|
+ goods_sn,
|
|
|
+ stock_num_low,
|
|
|
+ stock_num_up,
|
|
|
+ warn_num_low,
|
|
|
+ warn_num_up,
|
|
|
+ page: 1,
|
|
|
+ size: 15,
|
|
|
};
|
|
|
- console.log(this.ruleForm);
|
|
|
+ console.log(model);
|
|
|
+
|
|
|
const res = await asyncRequest.list(model);
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
// console.log(res.data.list);
|