diff --git a/src/api/ManufacturingCenter/MaterialAllocation.js b/src/api/ManufacturingCenter/MaterialAllocation.js
new file mode 100644
index 00000000..80a40d46
--- /dev/null
+++ b/src/api/ManufacturingCenter/MaterialAllocation.js
@@ -0,0 +1,124 @@
+import request from '@/utils/request'
+import state from '@/store'
+import router from '@/router'
+
+// export function projectSelect() {
+// return request({
+// url: '',
+// method: 'post',
+// data: {
+// type: '1',
+// name: 'PDM_项目名称_查询数据_按时间排序'
+// }
+// })
+// }
+
+export function machineSelect() {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '1',
+ name: 'PDM_项目名称_查询数据'
+ }
+ })
+}
+
+export function groupSelect(machineValue) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '1',
+ name: 'PDM_零件明细表_组件流水号_查询数据_根据机床',
+ param: `机床流水号=${machineValue}`
+ }
+ })
+}
+
+export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, pageSize, pageCurrent) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '1',
+ name: '零件分配查询_查询',
+ param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}`,
+ Pagination: pageCurrent + '&' + pageSize
+ }
+ })
+}
+// 根据机床和组查询规格型号 LLJ 新增
+export function searchModel(machine_check, machine, group_check, group) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '1',
+ name: '三表查询_根据机床组号查询规格型号',
+ param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}`
+ }
+ })
+}
+export function purchasePartsData(machine_check, machine, group_check, group, Model_check, ModelValue, pageSize, pageCurrent) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '1',
+ name: '零件分配查询_标准件和外购件_查询',
+ // param: `组件流水号=${num}`,
+ param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}`,
+ pagination: pageCurrent + '&' + pageSize
+ }
+ })
+}
+export function deleteBasicParts(basicNum) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '2',
+ name: 'PDM_零件明细表_基本件_删除数据',
+ param: `基本件流水号=${basicNum}`
+ }
+ })
+}
+export function deletePurchaseData(num) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '2',
+ name: 'PDM_零件明细表_标准件和外购件_删除数据',
+ param: '标准件和外购件流水号=' + num + '=int'
+ }
+ })
+}
+export function getFileData(MachineDrawValue) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ UserID: state.state.user.id,
+ ModularID: router.currentRoute.path,
+ type: '1',
+ name: 'PDM_机床总图_查询数据',
+ param: `机床流水号=${MachineDrawValue}`
+ }
+ })
+}
diff --git a/src/api/ManufacturingCenter/PartAssignment.js b/src/api/ManufacturingCenter/PartAssignment.js
index 11252bb6..1e6adbae 100644
--- a/src/api/ManufacturingCenter/PartAssignment.js
+++ b/src/api/ManufacturingCenter/PartAssignment.js
@@ -161,7 +161,8 @@ export function searchDetailed1(num) {
}
})
}
-export function purchaseRequisition(RequisitionList, projectName, projectFloatValue, MachineToolNumber, machineFloatValue, groupName, groupFloatValue, BasicPartsNumber, MaterialName, PartToolNumber, Material, NumberOfParts, PartType, time, MaterialNum, ReMarks) {
+export function purchaseRequisition(RequisitionList, projectName, projectFloatValue, MachineToolNumber, machineFloatValue, groupName, groupFloatValue, BasicPartsNumber, MaterialName, PartToolNumber, Material, NumberOfParts, PartType, time, MaterialNum, ReMarks, id) {
+ console.log(id, 9876787)
return request({
url: '',
method: 'post',
@@ -170,11 +171,11 @@ export function purchaseRequisition(RequisitionList, projectName, projectFloatVa
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_基本件采购_请购单明细_请购',
- param: '请购单流水号=' + RequisitionList + '&项目名称=' + projectName + '&项目流水号=' + projectFloatValue + '&机床图号=' + MachineToolNumber + '&机床流水号=' + machineFloatValue + '&组号=' + groupName + '&组件流水号=' + groupFloatValue + '&基本件流水号=' + BasicPartsNumber + '&物料名称=' + MaterialName + '&零件图号=' + PartToolNumber + '&材料=' + Material + '&零件数量=' + NumberOfParts + '&零件类型=' + PartType + '&物料计划到货时间=' + time + '&物料流水号=' + MaterialNum + '&备注=' + ReMarks
+ param: '请购单流水号=' + RequisitionList + '&项目名称=' + projectName + '&项目流水号=' + projectFloatValue + '&机床图号=' + MachineToolNumber + '&机床流水号=' + machineFloatValue + '&组号=' + groupName + '&组件流水号=' + groupFloatValue + '&基本件流水号=' + BasicPartsNumber + '&物料名称=' + MaterialName + '&零件图号=' + PartToolNumber + '&材料=' + Material + '&零件数量=' + NumberOfParts + '&零件类型=' + PartType + '&物料计划到货时间=' + time + '&物料流水号=' + MaterialNum + '&备注=' + ReMarks + '&分配人员=' + id
}
})
}
-export function purchaseRequisition1(RequisitionList, projectName, projectFloatValue, MachineToolNumber, machineFloatValue, groupName, groupFloatValue, StandardPartsAndOutsourcing, MaterialName, MaterialCode, MaterialSpecification, MaterialModel, NumberOfParts, PartType, time, MaterialNum, ReMarks) {
+export function purchaseRequisition1(RequisitionList, projectName, projectFloatValue, MachineToolNumber, machineFloatValue, groupName, groupFloatValue, StandardPartsAndOutsourcing, MaterialName, MaterialCode, MaterialSpecification, MaterialModel, NumberOfParts, PartType, time, MaterialNum, ReMarks, id) {
return request({
url: '',
method: 'post',
@@ -183,11 +184,11 @@ export function purchaseRequisition1(RequisitionList, projectName, projectFloatV
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_基本件采购_请购单明细_请购',
- param: '请购单流水号=' + RequisitionList + '&项目名称=' + projectName + '&项目流水号=' + projectFloatValue + '&机床图号=' + MachineToolNumber + '&机床流水号=' + machineFloatValue + '&组号=' + groupName + '&组件流水号=' + groupFloatValue + '&标准件和外购件流水号=' + StandardPartsAndOutsourcing + '&物料名称=' + MaterialName + '&物料代码=' + MaterialCode + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&零件数量=' + NumberOfParts + '&零件类型=' + PartType + '&物料计划到货时间=' + time + '&物料流水号=' + MaterialNum + '&备注=' + ReMarks
+ param: '请购单流水号=' + RequisitionList + '&项目名称=' + projectName + '&项目流水号=' + projectFloatValue + '&机床图号=' + MachineToolNumber + '&机床流水号=' + machineFloatValue + '&组号=' + groupName + '&组件流水号=' + groupFloatValue + '&标准件和外购件流水号=' + StandardPartsAndOutsourcing + '&物料名称=' + MaterialName + '&物料代码=' + MaterialCode + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&零件数量=' + NumberOfParts + '&零件类型=' + PartType + '&物料计划到货时间=' + time + '&物料流水号=' + MaterialNum + '&备注=' + ReMarks + '&分配人员=' + id
}
})
}
-export function purchaseRequisition2(projectFloatValue, machineFloatValue, groupFloatValue, BasicPartsNumber, NumberOfParts, time) {
+export function purchaseRequisition2(projectFloatValue, machineFloatValue, groupFloatValue, BasicPartsNumber, NumberOfParts, time, id) {
return request({
url: '',
method: 'post',
@@ -196,7 +197,7 @@ export function purchaseRequisition2(projectFloatValue, machineFloatValue, group
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_采购部采购_基本件_传递数据',
- param: `组件流水号=${groupFloatValue}&基本件流水号组=${BasicPartsNumber}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}&物料计划到货时间=${time}&零件数量组=${NumberOfParts}`
+ param: `组件流水号=${groupFloatValue}&基本件流水号组=${BasicPartsNumber}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}&物料计划到货时间=${time}&零件数量组=${NumberOfParts}&分配人员=${id}`
}
})
}
@@ -239,7 +240,7 @@ export function MoveOut1(num, num1) {
}
})
}
-export function PurchasingDepartment(num, num1, time, MaterialNum, NumberOfParts, projectFloatValue, machineFloatValue) {
+export function PurchasingDepartment(num, num1, time, MaterialNum, NumberOfParts, projectFloatValue, machineFloatValue, id) {
return request({
url: '',
method: 'post',
@@ -248,7 +249,7 @@ export function PurchasingDepartment(num, num1, time, MaterialNum, NumberOfParts
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_车间采购_标准件和外购件_传递数据',
- param: `组件流水号=${num}&标准件和外购件流水号组=${num1}&物料计划到货时间=${time}=datetime&物料流水号组=${MaterialNum}&零件数量组=${NumberOfParts}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}`
+ param: `组件流水号=${num}&标准件和外购件流水号组=${num1}&物料计划到货时间=${time}=datetime&物料流水号组=${MaterialNum}&零件数量组=${NumberOfParts}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}&分配人员=${id}`
}
})
}
@@ -265,7 +266,7 @@ export function PurchasingDepartmentBack(num, num1, MaterialNum, NumberOfParts,
}
})
}
-export function Production(num, MaterialNum, Number, projectFloatValue, machineFloatValue) {
+export function Production(num, MaterialNum, Number, projectFloatValue, machineFloatValue, id) {
return request({
url: '',
method: 'post',
@@ -274,7 +275,7 @@ export function Production(num, MaterialNum, Number, projectFloatValue, machineF
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_车间采购_基本件_传递数据',
- param: `组件流水号=${num}&基本件流水号组=${MaterialNum}&零件数量组=${Number}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}`
+ param: `组件流水号=${num}&基本件流水号组=${MaterialNum}&零件数量组=${Number}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}&分配人员=${id}`
}
})
}
diff --git a/src/views/BasicData/PartsNumberMaintenance/index.vue b/src/views/BasicData/PartsNumberMaintenance/index.vue
index bc2c78d8..a1ffedde 100644
--- a/src/views/BasicData/PartsNumberMaintenance/index.vue
+++ b/src/views/BasicData/PartsNumberMaintenance/index.vue
@@ -1132,7 +1132,7 @@ export default {
if (this.$refs['form3'] !== undefined) {
this.$refs['form3'].resetFields()
}
- console.log(row.跟单号, row.考核状态, row.状态)
+ console.log(row.跟单号, row.考核状态, row.状态, row.材料流水号)
if (row.基本件流水号 && this.type === 1 && row.跟单号 !== null) {
this.$confirm('跟单已打出,是否确定修改?', '提示', {
confirmButtonText: '确定',
@@ -1145,7 +1145,8 @@ export default {
this.form3.数量 = row.零件数量
this.form3.名称 = row.零件名称
this.form3.零件图号 = row.零件图号
- this.form3.材料 = row.材料流水号
+ this.form3.材料 = parseInt(row.材料流水号)
+ console.log(this.form3.材料, 123)
if (row.考核状态 >= 6 && row.状态 === '已加工') {
this.editnumber = true
} else {
@@ -1164,7 +1165,7 @@ export default {
this.form3.数量 = row.零件数量
this.form3.名称 = row.零件名称
this.form3.零件图号 = row.零件图号
- this.form3.材料 = row.材料
+ this.form3.材料 = parseInt(row.材料流水号)
if (row.考核状态 >= 6 && row.状态 === '已加工') {
this.editnumber = true
} else {
diff --git a/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue b/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue
index 7f359689..b87148bd 100644
--- a/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue
+++ b/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue
@@ -31,7 +31,7 @@
-
+
diff --git a/src/views/ManufacturingCenter/CompletionOfWorkshopComponents/index.vue b/src/views/ManufacturingCenter/CompletionOfWorkshopComponents/index.vue
index 1f02698d..d85ed5e2 100644
--- a/src/views/ManufacturingCenter/CompletionOfWorkshopComponents/index.vue
+++ b/src/views/ManufacturingCenter/CompletionOfWorkshopComponents/index.vue
@@ -18,6 +18,7 @@
:label="item.label"
:value="item.value"/>
+ 成组配套查询
@@ -128,11 +129,11 @@ export default {
watch: {
'$route': {
handler(route) {
+ console.log(this.$route.query.机床流水号, 8765678)
if (this.$route.query.机床流水号) {
- console.log(this.$route.query.机床流水号)
- this.getTreeData2(this.$route.query.机床流水号)
+ console.log(this.$route.query.机床流水号, 9877777777777)
+ this.getTreeData2(parseInt(this.$route.query.机床流水号))
} else {
- // var that = this
if (!this.MachineValue) {
this.getMachine()
}
@@ -145,6 +146,14 @@ export default {
// this.getMachine()
},
methods: {
+ turnTo() {
+ this.$router.push({
+ path: '/ManufacturingCenter/GroupMatching',
+ query: {
+ 机床流水号: this.MachineValue
+ }
+ })
+ },
getTreeData2(num) {
this.MachineValue = ''
this.Machine = []
diff --git a/src/views/ManufacturingCenter/GroupMatching/index.vue b/src/views/ManufacturingCenter/GroupMatching/index.vue
index bb36e0c6..73369a29 100644
--- a/src/views/ManufacturingCenter/GroupMatching/index.vue
+++ b/src/views/ManufacturingCenter/GroupMatching/index.vue
@@ -557,8 +557,26 @@ export default {
tableDataPurchase: []
}
},
+ watch: {
+ '$route': {
+ handler(route) {
+ console.log(this.$route.query.机床流水号, 8765678)
+ if (this.$route.query.机床流水号) {
+ this.materialName = ''
+ this.Group = ''
+ this.Groups = []
+ this.SearchMachine2(parseInt(this.$route.query.机床流水号))
+ } else {
+ if (!this.Machine) {
+ this.SearchMachine()
+ }
+ }
+ },
+ immediate: true
+ }
+ },
created() {
- this.SearchMachine()
+ // this.SearchMachine()
},
methods: {
sortChange(column, prop, order) {
@@ -732,6 +750,21 @@ export default {
}
})
},
+ // 查询机床2
+ SearchMachine2(num) {
+ searchmachine().then(response => {
+ this.Machines = []
+ for (let i = 0; i < response.data.length; i++) {
+ this.Machines.push({
+ label: response.data[i].机床图号,
+ value: response.data[i].机床流水号,
+ value2: response.data[i].装配状态
+ })
+ }
+ }).then(() => {
+ this.Machine = num
+ })
+ },
// 查询组号
searchGroupList() {
this.Group = ''
diff --git a/src/views/ManufacturingCenter/MaterialAllocation/Export2Excel.js b/src/views/ManufacturingCenter/MaterialAllocation/Export2Excel.js
new file mode 100644
index 00000000..20784f3a
--- /dev/null
+++ b/src/views/ManufacturingCenter/MaterialAllocation/Export2Excel.js
@@ -0,0 +1,220 @@
+/* eslint-disable */
+require('script-loader!file-saver');
+import XLSX from 'xlsx'
+
+function generateArray(table) {
+ var out = [];
+ var rows = table.querySelectorAll('tr');
+ var ranges = [];
+ for (var R = 0; R < rows.length; ++R) {
+ var outRow = [];
+ var row = rows[R];
+ var columns = row.querySelectorAll('td');
+ for (var C = 0; C < columns.length; ++C) {
+ var cell = columns[C];
+ var colspan = cell.getAttribute('colspan');
+ var rowspan = cell.getAttribute('rowspan');
+ var cellValue = cell.innerText;
+ if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
+
+ //Skip ranges
+ ranges.forEach(function (range) {
+ if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
+ for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
+ }
+ });
+
+ //Handle Row Span
+ if (rowspan || colspan) {
+ rowspan = rowspan || 1;
+ colspan = colspan || 1;
+ ranges.push({
+ s: {
+ r: R,
+ c: outRow.length
+ },
+ e: {
+ r: R + rowspan - 1,
+ c: outRow.length + colspan - 1
+ }
+ });
+ };
+
+ //Handle Value
+ outRow.push(cellValue !== "" ? cellValue : null);
+
+ //Handle Colspan
+ if (colspan)
+ for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
+ }
+ out.push(outRow);
+ }
+ return [out, ranges];
+};
+
+function datenum(v, date1904) {
+ if (date1904) v += 1462;
+ var epoch = Date.parse(v);
+ return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
+}
+
+function sheet_from_array_of_arrays(data, opts) {
+ var ws = {};
+ var range = {
+ s: {
+ c: 10000000,
+ r: 10000000
+ },
+ e: {
+ c: 0,
+ r: 0
+ }
+ };
+ for (var R = 0; R != data.length; ++R) {
+ for (var C = 0; C != data[R].length; ++C) {
+ if (range.s.r > R) range.s.r = R;
+ if (range.s.c > C) range.s.c = C;
+ if (range.e.r < R) range.e.r = R;
+ if (range.e.c < C) range.e.c = C;
+ var cell = {
+ v: data[R][C]
+ };
+ if (cell.v == null) continue;
+ var cell_ref = XLSX.utils.encode_cell({
+ c: C,
+ r: R
+ });
+
+ if (typeof cell.v === 'number') cell.t = 'n';
+ else if (typeof cell.v === 'boolean') cell.t = 'b';
+ else if (cell.v instanceof Date) {
+ cell.t = 'n';
+ cell.z = XLSX.SSF._table[14];
+ cell.v = datenum(cell.v);
+ } else cell.t = 's';
+
+ ws[cell_ref] = cell;
+ }
+ }
+ if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
+ return ws;
+}
+
+function Workbook() {
+ if (!(this instanceof Workbook)) return new Workbook();
+ this.SheetNames = [];
+ this.Sheets = {};
+}
+
+function s2ab(s) {
+ var buf = new ArrayBuffer(s.length);
+ var view = new Uint8Array(buf);
+ for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
+ return buf;
+}
+
+export function export_table_to_excel(id) {
+ var theTable = document.getElementById(id);
+ var oo = generateArray(theTable);
+ var ranges = oo[1];
+
+ /* original data */
+ var data = oo[0];
+ var ws_name = "SheetJS";
+
+ var wb = new Workbook(),
+ ws = sheet_from_array_of_arrays(data);
+
+ /* add ranges to worksheet */
+ // ws['!cols'] = ['apple', 'banan'];
+ ws['!merges'] = ranges;
+
+ /* add worksheet to workbook */
+ wb.SheetNames.push(ws_name);
+ wb.Sheets[ws_name] = ws;
+
+ var wbout = XLSX.write(wb, {
+ bookType: 'xlsx',
+ bookSST: false,
+ type: 'binary'
+ });
+
+ saveAs(new Blob([s2ab(wbout)], {
+ type: "application/octet-stream"
+ }), "test.xlsx")
+}
+
+export function export_json_to_excel({
+ multiHeader = [],
+ header,
+ data,
+ filename,
+ merges = [],
+ autoWidth = true,
+ bookType= 'xlsx'
+} = {}) {
+ /* original data */
+ filename = filename || 'excel-list'
+ data = [...data]
+ data.unshift(header);
+
+ for (let i = multiHeader.length-1; i > -1; i--) {
+ data.unshift(multiHeader[i])
+ }
+
+ var ws_name = "SheetJS";
+ var wb = new Workbook(),
+ ws = sheet_from_array_of_arrays(data);
+
+ if (merges.length > 0) {
+ if (!ws['!merges']) ws['!merges'] = [];
+ merges.forEach(item => {
+ ws['!merges'].push(XLSX.utils.decode_range(item))
+ })
+ }
+
+ if (autoWidth) {
+ /*设置worksheet每列的最大宽度*/
+ const colWidth = data.map(row => row.map(val => {
+ /*先判断是否为null/undefined*/
+ if (val == null) {
+ return {
+ 'wch': 10
+ };
+ }
+ /*再判断是否为中文*/
+ else if (val.toString().charCodeAt(0) > 255) {
+ return {
+ 'wch': val.toString().length * 2
+ };
+ } else {
+ return {
+ 'wch': val.toString().length
+ };
+ }
+ }))
+ /*以第一行为初始值*/
+ let result = colWidth[0];
+ for (let i = 1; i < colWidth.length; i++) {
+ for (let j = 0; j < colWidth[i].length; j++) {
+ if (result[j]['wch'] < colWidth[i][j]['wch']) {
+ result[j]['wch'] = colWidth[i][j]['wch'];
+ }
+ }
+ }
+ ws['!cols'] = result;
+ }
+
+ /* add worksheet to workbook */
+ wb.SheetNames.push(ws_name);
+ wb.Sheets[ws_name] = ws;
+
+ var wbout = XLSX.write(wb, {
+ bookType: bookType,
+ bookSST: false,
+ type: 'binary'
+ });
+ saveAs(new Blob([s2ab(wbout)], {
+ type: "application/octet-stream"
+ }), `${filename}.${bookType}`);
+}
diff --git a/src/views/ManufacturingCenter/MaterialAllocation/index.vue b/src/views/ManufacturingCenter/MaterialAllocation/index.vue
new file mode 100644
index 00000000..a5e69f64
--- /dev/null
+++ b/src/views/ManufacturingCenter/MaterialAllocation/index.vue
@@ -0,0 +1,594 @@
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+ {{ scope.row.零件分配 }}
+
+
+
+ {{ scope.row.机床图号 }}
+
+
+ {{ scope.row.组号 }}
+
+
+ {{ scope.row.零件图号 }}
+
+
+ {{ scope.row.零件名称 }}
+
+
+ {{ scope.row.物料名称 }}
+
+
+ {{ scope.row.零件数量 }}
+
+
+
+ {{ scope.row.部件数量 }}
+
+
+
+
+ {{ scope.row.机床数量 }}
+
+
+
+ {{ scope.row.材料 }}
+
+
+ {{ scope.row.规格 }}
+
+
+
+ {{ scope.row.零件类型名称 }}
+
+
+ {{ scope.row.分配人 }}
+
+
+ {{ scope.row.分配时间 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ManufacturingCenter/PartAssignment/index.vue b/src/views/ManufacturingCenter/PartAssignment/index.vue
index 5f2b1f43..fd205844 100644
--- a/src/views/ManufacturingCenter/PartAssignment/index.vue
+++ b/src/views/ManufacturingCenter/PartAssignment/index.vue
@@ -626,6 +626,7 @@ export default {
}
},
created() {
+ console.log(this.id, 99999999)
this.DeliveryTime = ''
this.fetchData()
this.PartCallbackInformation()
@@ -1270,7 +1271,8 @@ export default {
this.ReMarks[i] = this.multipleSelection_variable[i].零件备注
}
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
- purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
+ purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i], this.id).then(response => {
+ console.log(this.id, 'id')
this.result += parseInt(response.data[0].result)
if (this.result === this.BasicPartsNumber.length) {
this.$message.success('请购成功')
@@ -1317,7 +1319,7 @@ export default {
this.ReMarks[i] = this.multipleSelection_variable[i].备注
}
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
- purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
+ purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i], this.id).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
@@ -1364,7 +1366,7 @@ export default {
this.ReMarks[i] = this.multipleSelection_variable[i].备注
}
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
- purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
+ purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i], this.id).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
@@ -1432,7 +1434,7 @@ export default {
this.NumberOfParts[i] = this.multipleSelection_variable[i].投产总数量
this.ReMarks[i] = this.multipleSelection_variable[i].零件备注
}
- purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => {
+ purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time, this.id).then(response => {
if (response.data[0].result !== '0') {
console.log(response.data[0].result)
this.$message.success('请购成功')
@@ -1461,7 +1463,7 @@ export default {
this.NumberOfParts[i] = this.multipleSelection_variable[i].采购总数量
this.ReMarks[i] = this.multipleSelection_variable[i].备注
}
- PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
+ PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue, this.id).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('请购成功')
if (this.PartType === '外购件') {
@@ -1511,7 +1513,7 @@ export default {
this.NumberOfParts[i] = this.multipleSelection_variable[i].投产总数量
this.ReMarks[i] = this.multipleSelection_variable[i].零件备注
}
- Production(this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
+ Production(this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue, this.id).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('投产成功')
searchPart(this.groupFloatValue).then(response => {
diff --git a/src/views/ManufacturingCenter/ScrappedSupplementaryInvestment/index.vue b/src/views/ManufacturingCenter/ScrappedSupplementaryInvestment/index.vue
index 59e1c3fa..cd3b397f 100644
--- a/src/views/ManufacturingCenter/ScrappedSupplementaryInvestment/index.vue
+++ b/src/views/ManufacturingCenter/ScrappedSupplementaryInvestment/index.vue
@@ -31,7 +31,7 @@
- 提交补投
+ 提交补投
撤销补投
@@ -39,6 +39,7 @@
-
+
{{ scope.row.进程 }}
@@ -159,8 +160,13 @@
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '' }}
+
- 共{{ totalnumber }}条信息,选择{{ gouxuan }}条
+
+
+
+ 是否将零件提交报废?
+
+
+ 报废数量:
+
+
+
+
@@ -182,6 +205,10 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
+ num: 0,
+ nummax: 0,
+ nummin: 0,
+ dialogVisible: false,
switchValue: true, // 报废撤销开关
machineNameValue: '', // 机床图号
machineName: [],
@@ -220,6 +247,11 @@ export default {
this.projectChange()
},
methods: {
+ cellClass(row) {
+ if (row.columnIndex === 0) { // 你需要判断的条件
+ return 'disabledCheck'
+ }
+ },
projectChange() {
this.machineName = []
this.machineNameValue = ''
@@ -287,44 +319,35 @@ export default {
}
},
submit() {
- this.$confirm('是否将零件提交报废?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.ScrapQuantity = []
- this.ProcessPlanNumber = []
- this.Unqualified = []
- this.remarkGroup = []
- this.people = []
- this.operaPeople = []
- this.procedureGroup1 = []
- for (let i = 0; i < this.procedureGroup.length; i++) {
- this.ScrapQuantity.push(this.procedureGroup[i].不合格数量)
- this.ProcessPlanNumber.push(this.procedureGroup[i].工艺计划流水号)
- this.Unqualified.push(this.procedureGroup[i].不合格原因文本)
- this.remarkGroup.push(this.procedureGroup[i].备注)
- this.people.push(this.procedureGroup[i].人员编号)
- this.operaPeople.push(this.procedureGroup[i].操作人员编号)
- this.procedureGroup1.push(this.procedureGroup[i].工序流水号)
+ this.ScrapQuantity = []
+ this.ProcessPlanNumber = []
+ this.Unqualified = []
+ this.remarkGroup = []
+ this.people = []
+ this.operaPeople = []
+ this.procedureGroup1 = []
+ console.log(this.procedureGroup, 89000)
+ // for (let i = 0; i < this.procedureGroup.length; i++) {
+ // this.ScrapQuantity.push(this.procedureGroup[i].不合格数量)
+ this.ScrapQuantity.push(this.num)
+ this.ProcessPlanNumber.push(this.procedureGroup.工艺计划流水号)
+ this.Unqualified.push(this.procedureGroup.不合格原因文本)
+ this.remarkGroup.push(this.procedureGroup.备注)
+ this.people.push(this.procedureGroup.人员编号)
+ this.operaPeople.push(this.procedureGroup.操作人员编号)
+ this.procedureGroup1.push(this.procedureGroup.工序流水号)
+ // }
+ this.handleEdit_disable = true
+ editSpare(this.ProcessPlanNumber, this.ScrapQuantity, this.id, this.Unqualified, this.remarkGroup, this.people, this.operaPeople, this.procedureGroup1).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('报废成功')
+ this.searchTable()
+ } else {
+ this.handleEdit_disable = false
+ this.$message.success('报废失败')
}
- this.handleEdit_disable = true
- editSpare(this.ProcessPlanNumber, this.ScrapQuantity, this.id, this.Unqualified, this.remarkGroup, this.people, this.operaPeople, this.procedureGroup1).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('报废成功')
- this.searchTable()
- } else {
- this.handleEdit_disable = false
- this.$message.success('报废失败')
- }
- })
- }).catch((error) => {
- console.log(error)
- this.$message({
- type: 'info',
- message: '已取消报废'
- })
})
+ this.dialogVisible = false
},
// 20200509↓
switchValueChange() {
@@ -345,9 +368,9 @@ export default {
type: 'warning'
}).then(() => {
this.ProcessPlanNumber = []
- for (let i = 0; i < this.procedureGroup.length; i++) {
- this.ProcessPlanNumber.push(this.procedureGroup[i].工艺计划流水号)
- }
+ // for (let i = 0; i < this.procedureGroup.length; i++) {
+ this.ProcessPlanNumber.push(this.procedureGroup.工艺计划流水号)
+ // }
reSpare(this.ProcessPlanNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('撤回成功')
@@ -365,8 +388,21 @@ export default {
},
// 20200509↑
handleSelectionChange(val) {
- this.procedureGroup = val
- this.gouxuan = val.length
+ // this.procedureGroup = val
+ // this.gouxuan = val.length
+ if (val.length > 1) {
+ this.$refs.multipleTable.clearSelection()
+ this.$refs.multipleTable.toggleRowSelection(val[val.length - 1])
+ this.procedureGroup = val[val.length - 1]
+ this.num = this.procedureGroup.不合格数量
+ this.nummax = this.procedureGroup.投产数
+ } else if (val.length === 1) {
+ this.procedureGroup = val[0]
+ this.num = this.procedureGroup.不合格数量
+ this.nummax = this.procedureGroup.投产数
+ } else {
+ this.procedureGroup = []
+ }
},
// 分页
handleSizeChange(val) {
@@ -387,4 +423,22 @@ export default {
.el-table .UrgentItem{
background: #FF9797;
}
+ .el-table /deep/.disabledCheck .cell .el-checkbox__inner{
+ display: none!important;
+ }
+ .el-table /deep/.disabledCheck .cell:before{
+ content: '选择';
+ position: absolute;
+ right: 11px;
+ }
+
+
diff --git a/src/views/ManufacturingCenter/StatusQuery/index.vue b/src/views/ManufacturingCenter/StatusQuery/index.vue
index 53ba9053..b9867c48 100644
--- a/src/views/ManufacturingCenter/StatusQuery/index.vue
+++ b/src/views/ManufacturingCenter/StatusQuery/index.vue
@@ -70,11 +70,11 @@
{{ scope.row.传递时间 }}
-
+
-
-
+
+
@@ -247,6 +247,22 @@ export default {