-
@@ -249,6 +308,7 @@ import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
+import { mapGetters } from "vuex";
import Lockr from "lockr";
import moment from "moment";
import message_table from "../../components/mixins/message_table";
@@ -285,9 +345,16 @@ export default {
return {
crmType: "bomdatabase",
customerInfos: [],
+ billState: [
+ { id: 2, name: "R100" },
+ { id: 3, name: "M100" },
+ ],
+ isVINShowState:false,
OnlineTimeValue: [],
ReceiveTimeValue: [],
versionValue: "",
+ customerInfosMB:[],
+ customerInfosZHB:[],
versionList: [], //版本列表
searchContent: "", // 输入内容
showExcelImport: false,
@@ -307,6 +374,11 @@ export default {
},
},
listQuery: {
+
+ productType: 1, //1:门板;2:柱护板
+ ProductLine: undefined,
+ checked1:true,
+ checked2:true,
SkipCount: 0,
MaxResultCount: 15,
HostSNBegin: undefined,
@@ -319,13 +391,39 @@ export default {
VehicleModelCode: undefined,
Version: undefined,
KNR: undefined,
+ state: [],
+
+ },
+ listPLQuery: {
+ BillType: 2,
+ //UserId: this.userinfo.UserId,
+ },
+ vehicleModelQuery:{
+ dicTypeName:"派格车型",
},
page: 1,
// 显示搜索条件
+ // VehicleModelCodelist:[
+ // {id: 1, name: "C8"},
+ // {id: 2, name: "B8L"},
+ // {id: 3, name: "CC"},
+ // {id: 4, name: "BSMV"},
+ // {id: 5, name: "B9"},
+ // {id: 6, name: "Q5"},
+ // ],
+ productTypeList: [
+ { id: 1, name: "门板" },
+ { id: 2, name: "柱护板" },
+ ],
showSearch: true,
bomUnit,
+ PLList: [],
+ PLChildList: [], //筛选后产线下拉
multipleSelection: [],
drawer: false,
+ isShowState: true,
+ dialogTableVisible: false,
+ vehicleModelList:[],//车型list
//tableHeight: document.documentElement.clientHeight - 260,
};
},
@@ -338,7 +436,14 @@ export default {
});
},
created() {
- this.getList();
+ //this.getList();
+ this.billState.forEach((element, index) => {
+ if (index === 0) {
+ this.listQuery.state.push(element.id);
+ }
+ });
+ this.getvehicleModel();
+ this.getProductLine();
},
computed: {
getDefaultField() {
@@ -350,11 +455,11 @@ export default {
prop: "knr",
width: 120,
});
- // tempsTabs.push({
- // label: "底盘号",
- // prop: "vin",
- // width: 130,
- // });
+ tempsTabs.push({
+ label: "底盘号",
+ prop: "vin",
+ width: 130,
+ });
tempsTabs.push({
label: "上线时间",
prop: "onlineTime",
@@ -375,6 +480,17 @@ export default {
prop: "version",
width: 150,
});
+ tempsTabs.push({
+ label: "产线",
+ prop: "printNum",
+ width: 150,
+ });
+ tempsTabs.push({
+ label: "数据采集点",
+ prop: "",
+ width: 150,
+ });
+
tempsTabs.push({ label: "单据状态", prop: "billStatus", width: 120 });
tempsTabs.push({
label: "车型名称",
@@ -383,8 +499,15 @@ export default {
});
return tempsTabs;
},
+ ...mapGetters(["userInfo"]), //获取当前用户信息
},
methods: {
+ ss(data) {
+ //alert(data);
+ //版本下拉选择
+ this.valueSelect = data;
+ this.getList();
+ },
//抽屉
handleDrawerOpen(param) {
this.drawer = true;
@@ -461,26 +584,50 @@ export default {
});
});
},
+ /*单据状态变更 */
+ checkedListChange(index) {
+ if (this.listQuery.state.length <= 1) {
+ this.listQuery.state.push(this.billState[index].id);
+ } else {
+ this.listQuery.state = [];
+ this.listQuery.state.push(this.billState[index].id);
+ }
+ if(this.listQuery.state[0]=="3")
+ {
+ this.isVINShowState = true;
+ }
+ else
+ {
+ this.isVINShowState = false;
+ }
+ },
/** 重置按钮操作 */
resetQuery(refName) {
this.OnlineTimeValue = [];
this.ReceiveTimeValue = [];
+ this.listQuery.state = [];
this.$refs[refName].resetFields();
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.listQuery.SkipCount = 1;
- this.getList();
+ //this.getList();
+ // this.getListM100();
+ // this.getListR100();
},
selectValue(params) {
//版本下拉选择
this.versionValue = params.value;
this.getList();
+ // this.getListM100();
+ // this.getListR100();
},
selectOptionsChange(item) {
this.getList();
+ // this.getListM100();
+ // this.getListR100();
},
importExcelData() {
//关闭导入窗体时调用
@@ -492,6 +639,8 @@ export default {
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
+ // this.getListM100();
+ // this.getListR100();
}
},
/** 格式化字段 */
@@ -512,8 +661,11 @@ export default {
},
roleFilter(type) {
return projectTypeKeyValue[type];
+
},
- getList(data) {
+
+ getList(data){
+
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
@@ -524,11 +676,38 @@ export default {
this.listQuery.OnlineTimeBegin = this.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.OnlineTimeValue[1];
}
+ // if (this.valueSelect != "") {
+ // this.listQuery.VehicleModelCode = this.valueSelect;
+ // } else {
+ // this.listQuery.VehicleModelCode = "";
+ // }
if (this.ReceiveTimeValue != []) {
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.ReceiveTimeValue[1];
}
- this.$axios
+
+if(this.listQuery.state[0] == "2")
+{
+ this.dialogTableVisible = false;
+ console.log("555555555555555555555555555555"+JSON.stringify(this.listQuery));
+ this.$axios
+ .gets("/api/newjit/repeat-r100/list", this.listQuery)
+ .then((response) => {
+ this.list = response.items;
+ this.totalCount = response.totalCount;
+ setTimeout(() => {
+ //大数据量加载时
+ this.listLoading = false;
+ }, 500);
+ })
+ .catch(() => {
+ this.listLoading = false;
+ });
+}
+else
+{
+ this.dialogTableVisible = true;
+this.$axios
.gets("/api/newjit/repeat-m100/list", this.listQuery)
.then((response) => {
this.list = response.items;
@@ -541,13 +720,97 @@ export default {
.catch(() => {
this.listLoading = false;
});
- },
+}
+ // if (this.billState=== 2) {
+
+ // this.$axios
+ // .gets("/api/newjit/repeat-r100/list", this.listQuery)
+ // .then((response) => {
+ // this.list = response.items;
+ // this.totalCount = response.totalCount;
+ // setTimeout(() => {
+ // //大数据量加载时
+ // this.listLoading = false;
+ // }, 500);
+ // })
+ // .catch(() => {
+ // this.listLoading = false;
+ // });
+ // }
+ // else if(this.billState === 3){
+
+ // this.$axios
+ // .gets("/api/newjit/repeat-m100/list", this.listQuery)
+ // .then((response) => {
+ // this.list = response.items;
+ // this.totalCount = response.totalCount;
+ // setTimeout(() => {
+ // //大数据量加载时
+ // this.listLoading = false;
+ // }, 500);
+ // })
+ // .catch(() => {
+ // this.listLoading = false;
+ // });
+ // }
+ //}
+
+
+ },
+ // getList(data) {
+ // this.listLoading = true;
+ // if (data != undefined) {
+ // this.listQuery.SkipCount = (this.page - 1) * data.limit;
+ // } else {
+ // this.listQuery.SkipCount = (this.page - 1) * 15;
+ // }
+ // if (this.OnlineTimeValue != []) {
+ // this.listQuery.OnlineTimeBegin = this.OnlineTimeValue[0];
+ // this.listQuery.OnlineTimeEnd = this.OnlineTimeValue[1];
+ // }
+ // if (this.ReceiveTimeValue != []) {
+ // this.listQuery.ReceiveTimeBegin = this.ReceiveTimeValue[0];
+ // this.listQuery.ReceiveTimeEnd = this.ReceiveTimeValue[1];
+ // }
+ // if (this.listQuery.state !== undefined) {
+ // this.listQuery.billStatus = this.listQuery.state[0];
+ // }
+ // //this.listQueryList.ProductLine = this.listQuery.productLine;
+ // this.$axios
+ // .gets("/api/newjit/repeat-m100/list", this.listQuery)
+ // .then((response) => {
+ // this.list = response.items;
+ // this.totalCount = response.totalCount;
+ // setTimeout(() => {
+ // //大数据量加载时
+ // this.listLoading = false;
+ // }, 500);
+ // })
+ // .catch(() => {
+ // this.listLoading = false;
+ // });
+ // },
handleFilter() {
+ this.dialogTableVisible = false;
this.page = 1;
this.getList();
+ // this.getListM100();
+ // this.getListR100();
},
-
+ //产线类型变更
+ ptypeselectChange() {
+ debugger
+ this.$forceUpdate();
+ //console.log("222222222222222222222222222222222222222222"+this.listQuery.productType);
+ this.listQuery.productLine = "";
+ this.PLChildList = this.PLList.filter(
+ (u) => u.productType === parseInt(this.listQuery.productType)
+ ).sort((a, b) => {
+ return a.productLineCode - b.productLineCode;
+ });
+ console.log(this.PLList)
+ },
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
@@ -557,9 +820,85 @@ export default {
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
+ getProductLine() {
+ //debugger
+ //console.log(JSON.stringify(this.userInfo));
+ this.listPLQuery.UserId = this.userInfo.userId;
+ console.log("this.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserId"+this.listPLQuery.UserId);
+ this.$axios
+ .gets("/api/newjit/product-line/list", this.listPLQuery)
+ .then((response) => {
+
+ //console.log("获取产线数据:"+JSON.stringify(response.item));
+ this.PLList = response.item;
+
+ this.PLChildList = this.PLList.filter(
+ (u) => u.productType === parseInt(this.listQuery.productType)
+ ).sort((a, b) => {
+ return a.productLineCode - b.productLineCode;
+ });
+ console.log("2222222获取产线数据:"+JSON.stringify(this.PLChildList));
+ this.listQuery.productLine = this.PLChildList[0].productLineCode;
+ if (this.listQuery.productLine != "") {
+ //把产线值传到子组件
+ this.customerInfosMB = [
+ {
+ PrintType: 1,
+ ProductLine: this.PLChildList[0].productLineCode,
+ },
+ ];
+ }
+ this.getList();
+ // this.getListM100();
+ // this.getListR100();
+ //console.log(this.PLList)
+ })
+ .catch(() => {});
+ },
+ valueselectChange1(){},
+
+ valueselectChange(val) {
+ this.$forceUpdate();
+ this.customerInfosMB = [];
+ this.customerInfosZHB = [];
+ if (this.listQuery.productType === 1) {
+ //把产线值传到子组件
+ this.customerInfosMB = [
+ {
+ PrintType: 1,
+ ProductLine: val,
+ },
+ ];
+ }
+ if (this.listQuery.productType === 2) {
+ //把产线值传到子组件
+ this.customerInfosZHB = [
+ {
+ PrintType: 1,
+ ProductLine: val,
+ },
+ ];
+ }
+ },
+
handleSelectionChange(val) {
this.multipleSelection = val;
},
+
+ getvehicleModel()
+ {
+ this.$axios
+ .gets(
+ "/api/newjit/dic/list",this.vehicleModelQuery
+ )
+ .then((response) => {
+ //console.log(response);
+ this.vehicleModelList = response.item;
+ //console.log()
+ })
+ .catch(() => {
+ });
+ },
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
diff --git a/vue/src/views/pg-fis/basedate/select/index.vue b/vue/src/views/pg-fis/basedate/select/index.vue
index eb065065..738b689e 100644
--- a/vue/src/views/pg-fis/basedate/select/index.vue
+++ b/vue/src/views/pg-fis/basedate/select/index.vue
@@ -500,6 +500,7 @@ export default {
ReceiveTimeEnd: undefined,
billStatus: undefined,
state: [],
+ ZHBBillStatus: undefined,
},
listExportQuery: {
erpAssemblyCode: undefined,
@@ -807,6 +808,11 @@ export default {
if (this.listQuery.state !== undefined) {
this.listQuery.billStatus = this.listQuery.state[0];
}
+ if (this.listQuery.productType === 2) {
+ this.listQuery.ZHBBillStatus = 2;
+ } else {
+ this.listQuery.ZHBBillStatus = 0;
+ }
this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => {