|
@@ -123,6 +123,36 @@
|
|
|
<el-button type="primary" @click="batchConfirm">确 定</el-button>
|
|
<el-button type="primary" @click="batchConfirm">确 定</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+ <ele-modal
|
|
|
|
|
+ width="65vw"
|
|
|
|
|
+ :visible.sync="fileVisible"
|
|
|
|
|
+ v-if="visible"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ :maxable="true"
|
|
|
|
|
+ :title="fileTitle"
|
|
|
|
|
+ >
|
|
|
|
|
+ <ele-pro-table
|
|
|
|
|
+ ref="ncFileTable"
|
|
|
|
|
+ :columns="fileTitle == 'NC代码' ? jobColumns2 : jobColumns1"
|
|
|
|
|
+ :datasource="fileList"
|
|
|
|
|
+ :need-page="false"
|
|
|
|
|
+ :immediate="true"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:action="{ row, $index }">
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="fileDetails(row, fileTitle == 'NC代码' ? 'nc' : '')"
|
|
|
|
|
+ >详情</el-link
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </ele-pro-table>
|
|
|
|
|
+ <template v-slot:footer v-if="fileTitle == 'NC代码'">
|
|
|
|
|
+ <el-button size="small" @click="fileVisible=false">返回</el-button>
|
|
|
|
|
+ <el-button type="primary" size="small" @click="save('齐套')">齐套</el-button>
|
|
|
|
|
+ <el-button type="primary" size="small" @click="save('缺料')">不齐套</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ele-modal>
|
|
|
|
|
|
|
|
<kitting-complete ref="kittingCompleteRef"></kitting-complete>
|
|
<kitting-complete ref="kittingCompleteRef"></kitting-complete>
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
@@ -133,10 +163,14 @@
|
|
|
completenessCheck,
|
|
completenessCheck,
|
|
|
taskReleaseWork,
|
|
taskReleaseWork,
|
|
|
updatePreRelease,
|
|
updatePreRelease,
|
|
|
- updatePreReleaseOrder
|
|
|
|
|
|
|
+ updatePreReleaseOrder,
|
|
|
|
|
+ listBomTaskFile,
|
|
|
|
|
+ newFilePageAPI
|
|
|
} from '@/api/productionPlan';
|
|
} from '@/api/productionPlan';
|
|
|
import { listOrganizations, getUserPage } from '@/api/system/organization';
|
|
import { listOrganizations, getUserPage } from '@/api/system/organization';
|
|
|
import kittingComplete from './kittingComplete.vue';
|
|
import kittingComplete from './kittingComplete.vue';
|
|
|
|
|
+ import { setFileUrl } from '@/components/addDoc/util.js';
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: { kittingComplete },
|
|
components: { kittingComplete },
|
|
|
props: {
|
|
props: {
|
|
@@ -153,6 +187,8 @@
|
|
|
selection: [],
|
|
selection: [],
|
|
|
planId: '',
|
|
planId: '',
|
|
|
preReleaseList: [],
|
|
preReleaseList: [],
|
|
|
|
|
+ fileTitle: '',
|
|
|
|
|
+ fileVisible: false,
|
|
|
typeList: [
|
|
typeList: [
|
|
|
{
|
|
{
|
|
|
value: 1,
|
|
value: 1,
|
|
@@ -179,6 +215,132 @@
|
|
|
label: '人员齐套'
|
|
label: '人员齐套'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
+ // 表格选中数据
|
|
|
|
|
+ jobColumns1: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '编码',
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ width: 180,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'name',
|
|
|
|
|
+ label: '文档名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'name',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 200
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'storagePath',
|
|
|
|
|
+ label: '文件名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 200,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return cellValue[0]?.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'version',
|
|
|
|
|
+ label: '版本',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 100
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'createTime',
|
|
|
|
|
+ label: '创建时间',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'action',
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ width: 100,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ resizable: false,
|
|
|
|
|
+ slot: 'action',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ // 表格选中数据
|
|
|
|
|
+ jobColumns2: [
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ label: '序号',
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ width: 55,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '编码',
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ width: 180,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'name',
|
|
|
|
|
+ label: '名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'name',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 200
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'versions',
|
|
|
|
|
+ label: '版本',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 100
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'remark',
|
|
|
|
|
+ label: '文本描述',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 200
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'ncSize',
|
|
|
|
|
+ label: '文件大小',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 100
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'createName',
|
|
|
|
|
+ label: '创建人',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'createTime',
|
|
|
|
|
+ label: '创建时间',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'action',
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ width: 100,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ resizable: false,
|
|
|
|
|
+ slot: 'action',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
groupList: [],
|
|
groupList: [],
|
|
|
leaderList: [],
|
|
leaderList: [],
|
|
|
form: {
|
|
form: {
|
|
@@ -284,7 +446,19 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ fileDetails(row, type) {
|
|
|
|
|
+ if (type == 'nc') {
|
|
|
|
|
+ newFilePageAPI({
|
|
|
|
|
+ ids: "'" + row.fileId + "'"
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.length) {
|
|
|
|
|
+ window.open(setFileUrl(res[0]));
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ window.open(setFileUrl(row));
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
getTypeLabel(value) {
|
|
getTypeLabel(value) {
|
|
|
const item = this.typeList.find((it) => it.value === value);
|
|
const item = this.typeList.find((it) => it.value === value);
|
|
|
return item ? item.label : '';
|
|
return item ? item.label : '';
|
|
@@ -314,6 +488,13 @@
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ save(statusStr){
|
|
|
|
|
+ let data=this.preReleaseList.find(item=>item.preType==5)
|
|
|
|
|
+ console.log(data)
|
|
|
|
|
+ data.statusStr=statusStr
|
|
|
|
|
+ this.updatePreRelease(data);
|
|
|
|
|
+ this.fileVisible=false
|
|
|
|
|
+ },
|
|
|
updatePreRelease(item) {
|
|
updatePreRelease(item) {
|
|
|
if (this.type == 'plan') {
|
|
if (this.type == 'plan') {
|
|
|
updatePreRelease(item);
|
|
updatePreRelease(item);
|
|
@@ -323,8 +504,8 @@
|
|
|
}
|
|
}
|
|
|
this.$emit('update');
|
|
this.$emit('update');
|
|
|
},
|
|
},
|
|
|
- kittingComplete(item) {
|
|
|
|
|
- if (item.preType == '5' || item.preType == '6') {
|
|
|
|
|
|
|
+ async kittingComplete(item) {
|
|
|
|
|
+ if (item.preType == '6') {
|
|
|
this.$confirm('是否确认齐套?', '提示', {
|
|
this.$confirm('是否确认齐套?', '提示', {
|
|
|
confirmButtonText: '齐套',
|
|
confirmButtonText: '齐套',
|
|
|
cancelButtonText: '不齐套',
|
|
cancelButtonText: '不齐套',
|
|
@@ -341,7 +522,33 @@
|
|
|
this.updatePreRelease(item);
|
|
this.updatePreRelease(item);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ } else if (item.preType == '4' || item.preType == '5') {
|
|
|
|
|
+ const res = await listBomTaskFile(
|
|
|
|
|
+ this.itemData.bomCategoryId,
|
|
|
|
|
+ this.itemData.produceRoutingId
|
|
|
|
|
+ );
|
|
|
|
|
+ let fileParam = [];
|
|
|
|
|
+ let ncCodeList = [];
|
|
|
|
|
+ res.forEach((row) => {
|
|
|
|
|
+ fileParam.push(row.fileParam.map((item) => item.id));
|
|
|
|
|
+ ncCodeList.push(row.ncCodeList);
|
|
|
|
|
+ });
|
|
|
|
|
+ if (item.preType == '4') {
|
|
|
|
|
+ fileParam = fileParam.flatMap((subarray) => subarray);
|
|
|
|
|
+ if (fileParam.length) {
|
|
|
|
|
+ this.fileList = await newFilePageAPI({
|
|
|
|
|
+ ids: "'" + fileParam + "'"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.fileTitle = '工艺文件';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.fileTitle = 'NC代码';
|
|
|
|
|
+ this.fileList = ncCodeList.flatMap((subarray) => subarray);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.fileVisible = true;
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ this.itemData.productionPlanId=this.itemData.productionPlanId||this.itemData.id
|
|
|
const list = [this.itemData];
|
|
const list = [this.itemData];
|
|
|
this.$refs.kittingCompleteRef.open(list);
|
|
this.$refs.kittingCompleteRef.open(list);
|
|
|
}
|
|
}
|