parent
354f82bd36
commit
73d96c57da
|
@ -10,6 +10,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="params.type"
|
v-model="params.type"
|
||||||
clearable
|
clearable
|
||||||
|
style="width: 120px;"
|
||||||
@change="materialTypeChange"
|
@change="materialTypeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -20,6 +21,19 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<xtSelect
|
||||||
|
:apiObj="apiObj"
|
||||||
|
v-model="query.material"
|
||||||
|
v-model:obj="selectObj"
|
||||||
|
:labelField="'name'"
|
||||||
|
style="width: 150px;"
|
||||||
|
:params="mquery"
|
||||||
|
@change="selectMaterialChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
|
<el-table-column label="型号" prop="model"></el-table-column>
|
||||||
|
<el-table-column label="规格" prop="spcification"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
@ -67,6 +81,7 @@
|
||||||
id="exportDiv11"
|
id="exportDiv11"
|
||||||
stripe
|
stripe
|
||||||
hideDo
|
hideDo
|
||||||
|
:pageSize="500"
|
||||||
:summary-method="getSummaries2"
|
:summary-method="getSummaries2"
|
||||||
show-summary
|
show-summary
|
||||||
>
|
>
|
||||||
|
@ -228,16 +243,28 @@ export default {
|
||||||
materialType: "",
|
materialType: "",
|
||||||
params: { is_hidden: false, type: 10, count__gte: 1 },
|
params: { is_hidden: false, type: 10, count__gte: 1 },
|
||||||
query: {
|
query: {
|
||||||
|
material: "",
|
||||||
mio_type: mioTypeEnum.values[0].key,
|
mio_type: mioTypeEnum.values[0].key,
|
||||||
},
|
},
|
||||||
|
mquery:{
|
||||||
|
page: 0,
|
||||||
|
type__in: "10",
|
||||||
|
is_hidden: false,
|
||||||
|
is_assemb: false,
|
||||||
|
},
|
||||||
|
selectObj: {},
|
||||||
mio_type_name: mioTypeEnum.values[0].text,
|
mio_type_name: mioTypeEnum.values[0].text,
|
||||||
queryType: "月",
|
queryType: "年",
|
||||||
queryDate: "",
|
queryDate: "",
|
||||||
start_date: "",
|
start_date: "",
|
||||||
end_date: "",
|
end_date: "",
|
||||||
currentYear: "",
|
currentYear: "",
|
||||||
currentMonth: "",
|
currentMonth: "",
|
||||||
currentLastDay: "",
|
currentLastDay: "",
|
||||||
|
material_name: "",
|
||||||
|
material_type: "",
|
||||||
|
material_model: "",
|
||||||
|
material_specification: "",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableData1: [],
|
tableData1: [],
|
||||||
tableData11: [],
|
tableData11: [],
|
||||||
|
@ -258,7 +285,6 @@ export default {
|
||||||
{ id: 20, name: "半成品" },
|
{ id: 20, name: "半成品" },
|
||||||
{ id: 30, name: "主要原料" },
|
{ id: 30, name: "主要原料" },
|
||||||
{ id: 40, name: "辅助材料" },
|
{ id: 40, name: "辅助材料" },
|
||||||
{ id: 70, name: "办公用品" },
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -271,9 +297,9 @@ export default {
|
||||||
that.currentYear = year;
|
that.currentYear = year;
|
||||||
that.currentMonth = month > 9 ? month : "0" + month;
|
that.currentMonth = month > 9 ? month : "0" + month;
|
||||||
that.currentLastDay = lastDay;
|
that.currentLastDay = lastDay;
|
||||||
that.queryDate = that.currentYear + "-" + that.currentMonth;
|
that.queryDate = that.currentYear+'';
|
||||||
that.start_date = that.currentYear + "-" + that.currentMonth + "-01";
|
that.start_date = that.currentYear + "-01-01";
|
||||||
that.end_date = that.currentYear + "-" + that.currentMonth + "-" + lastDay;
|
that.end_date = that.currentYear + "-12-31";
|
||||||
that.getTableData();
|
that.getTableData();
|
||||||
that.getTableData1();
|
that.getTableData1();
|
||||||
},
|
},
|
||||||
|
@ -340,6 +366,9 @@ export default {
|
||||||
that.modelFilters11 = [];
|
that.modelFilters11 = [];
|
||||||
that.specsFilters11 = [];
|
that.specsFilters11 = [];
|
||||||
let nameList=[],specsList=[],modelList=[];
|
let nameList=[],specsList=[],modelList=[];
|
||||||
|
if(that.material_name!==''&&that.material_name!==null){
|
||||||
|
that.params.name = that.material_name;
|
||||||
|
}
|
||||||
this.$API.mtm.material.list.req(that.params).then((res) => {
|
this.$API.mtm.material.list.req(that.params).then((res) => {
|
||||||
that.tableData11 = res.results;
|
that.tableData11 = res.results;
|
||||||
if(res.results.length>0){
|
if(res.results.length>0){
|
||||||
|
@ -371,11 +400,14 @@ export default {
|
||||||
},
|
},
|
||||||
materialTypeChange(){
|
materialTypeChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.mquery.type__in = that.params.type;
|
||||||
|
that.material_type = that.params.type;
|
||||||
if(that.params.type == 10 || that.params.type == 20){
|
if(that.params.type == 10 || that.params.type == 20){
|
||||||
that.getTableData1();
|
that.getTableData1();
|
||||||
}else{
|
}else{
|
||||||
that.getTableData11();
|
that.getTableData11();
|
||||||
}
|
}
|
||||||
|
that.getTableData();
|
||||||
},
|
},
|
||||||
//更改周预估用量
|
//更改周预估用量
|
||||||
weekcountChange(row) {
|
weekcountChange(row) {
|
||||||
|
@ -400,6 +432,18 @@ export default {
|
||||||
mio_type: that.query.mio_type,
|
mio_type: that.query.mio_type,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
if(that.material_name!==''&&that.material_name!==null){
|
||||||
|
obj.query.material_name = that.material_name;
|
||||||
|
}
|
||||||
|
if(that.material_type!==''&&that.material_type!==null){
|
||||||
|
obj.query.material_type = that.material_type;
|
||||||
|
}
|
||||||
|
if(that.material_model!==''&&that.material_model!==null){
|
||||||
|
obj.query.material_model = that.material_model;
|
||||||
|
}
|
||||||
|
if(that.material_specification!==''&&that.material_specification!==null){
|
||||||
|
obj.query.material_specification = that.material_specification;
|
||||||
|
}
|
||||||
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
|
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
|
||||||
if (res.data2.ds0) {
|
if (res.data2.ds0) {
|
||||||
let data = res.data2.ds0;
|
let data = res.data2.ds0;
|
||||||
|
@ -447,6 +491,16 @@ export default {
|
||||||
}
|
}
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
|
selectMaterialChange() {
|
||||||
|
var that = this;
|
||||||
|
console.log(that.selectObj);
|
||||||
|
that.query.material = that.selectObj.id;
|
||||||
|
that.material_name = that.selectObj.name;
|
||||||
|
that.material_type = that.selectObj.type;
|
||||||
|
that.material_model = that.selectObj.model;
|
||||||
|
that.material_specification = that.selectObj.specification;
|
||||||
|
that.getTableData();
|
||||||
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.queryType == "月") {
|
if (that.queryType == "月") {
|
||||||
|
@ -523,25 +577,25 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
filterName1(value, row) {
|
filterName1(value, row) {
|
||||||
return row.物料名 == value;
|
return row.material_name == value;
|
||||||
},
|
},
|
||||||
filterSpecs1(value, row) {
|
filterSpecs1(value, row) {
|
||||||
return row.规格 == value;
|
return row.material_specification == value;
|
||||||
},
|
},
|
||||||
filterModel1(value, row) {
|
filterModel1(value, row) {
|
||||||
return row.型号 == value;
|
return row.material_model == value;
|
||||||
},
|
},
|
||||||
filterDept1(value, row) {
|
filterDept1(value, row) {
|
||||||
return row.完成车间 == value;
|
return row.dept_name == value;
|
||||||
},
|
},
|
||||||
filterName11(value, row) {
|
filterName11(value, row) {
|
||||||
return row.物料名 == value;
|
return row.name == value;
|
||||||
},
|
},
|
||||||
filterSpecs11(value, row) {
|
filterSpecs11(value, row) {
|
||||||
return row.规格 == value;
|
return row.specification == value;
|
||||||
},
|
},
|
||||||
filterModel11(value, row) {
|
filterModel11(value, row) {
|
||||||
return row.型号 == value;
|
return row.model == value;
|
||||||
},
|
},
|
||||||
filterName2(value, row) {
|
filterName2(value, row) {
|
||||||
return row.物料名 == value;
|
return row.物料名 == value;
|
||||||
|
|
Loading…
Reference in New Issue