Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling

dev-scheduling
zzq731706 4 months ago
commit b0446a7eeb
  1. 47
      src/api/productionSchedulingPlan/basic.js
  2. 64
      src/api/qualityManagement/inspectionArchiving/rbFilePreserve.js
  3. 4
      src/error.js
  4. 2
      src/router/page/index.js
  5. 12
      src/views/periodicTesting/components/addTestProjectDialog.vue
  6. 49
      src/views/periodicTesting/projectCycle.vue
  7. 46
      src/views/periodicTesting/testTask.vue
  8. 11
      src/views/productionSchedulingPlan/basic/equipmentCapacity.vue
  9. 11
      src/views/productionSchedulingPlan/basic/personnelCapacity.vue
  10. 10
      src/views/productionSchedulingPlan/basic/principalProducer.vue
  11. 13
      src/views/productionSchedulingPlan/basic/qualityGrade.vue
  12. 289
      src/views/productionSchedulingPlan/basic/sintTempCurve.vue
  13. 2020
      src/views/productionSchedulingPlan/schedulingDashboard/container.vue
  14. 1709
      src/views/productionSchedulingPlan/schedulingDashboard/index.vue
  15. 15
      src/views/productionSchedulingPlan/schedulingDashboard/indexMenu.vue
  16. 6
      src/views/productionSchedulingPlan/schedulingException/index.vue
  17. 9671
      src/views/productionTesting/components/sametankView.vue
  18. 284
      src/views/productionTesting/productionQuality.vue
  19. 346
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/addPreserve.vue
  20. 12
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/detailRb.vue
  21. 191
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/index.vue
  22. 49
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/templatePreserve.vue
  23. 196
      src/views/qualityManagement/qualityObjective/components/table.vue

@ -333,3 +333,50 @@ export const getDetailOutsourceProcess = params => {
params: params, params: params,
}); });
}; };
// 烧结温度曲线 增删改查
export const getListSintTempCurve = (current, size, params) => {
return request({
url: '/blade-scheduling/sintTempCurve/page',
method: 'get',
params: {
...params,
current,
size,
},
});
};
export const removeSintTempCurve = ids => {
return request({
url: '/blade-scheduling/sintTempCurve/remove',
method: 'post',
params: {
ids,
},
});
};
export const addSintTempCurve = row => {
return request({
url: '/blade-scheduling/sintTempCurve/save',
method: 'post',
data: row,
});
};
export const updateSintTempCurve = row => {
return request({
url: '/blade-scheduling/sintTempCurve/update',
method: 'post',
data: row,
});
};
export const getDetailSintTempCurve = params => {
return request({
url: '/blade-scheduling/outsourceProcess/detail',
method: 'get',
params: params,
});
};

@ -12,7 +12,7 @@ export const getList = (params) => {
// 新增 // 新增
export const addRecords = (data) =>{ export const addRecords = (data) =>{
return request({ return request({
url:'/api/blade-desk/QA/ProReTemplate/save', url:'/api/blade-desk/QA/ProReTemplate/saveBat',
method:'post', method:'post',
data data
}) })
@ -35,3 +35,65 @@ export const deleteRecords = (params) =>{
params params
}) })
} }
// 电子档案详情
export const getWordDetail = (params) =>{
return request({
url:'/api/blade-desk/QA/ProReTemplate/detail',
method:'get',
params
})
}
// 复制
export const copyData = (params) =>{
return request({
url:'/api/blade-desk/QA/ProReTemplate/copy',
method:'get',
params
})
}
// 获取作业中心下拉
export const getWorkList = (params) =>{
return request({
url:'/api/blade-desk/BA/WorkCenter/listForSelect',
method:'get',
params
})
}
// 获取工序下拉数据
export const getProcessList = (params) =>{
return request({
url:'/api/blade-desk/dsProcess/list',
method:'get',
params
})
}
// 维护电子档案
export const editTable = (data) =>{
return request({
url:'/api/blade-desk/QA/ProReTemplate/updateDetail',
method:'post',
data
})
}
// 删除电子档案数据
export const deleteTable = (params) =>{
return request({
url:'/api/blade-desk/QA/ProReTemplate/removeFromDetail',
method:'get',
params
})
}
// 获取过程记录模板-审批状态字典
export const getApprovalStatus = (params) =>{
return request({
url:'/api/blade-system/dict/dictionary?code=ProReTemplate-ApprovalStatus',
method:'get'
})
}

@ -9,7 +9,7 @@ export default {
stack: err.stack, stack: err.stack,
info, info,
}); });
if (process.env.NODE_ENV === 'development') { // if (process.env.NODE_ENV === 'development') {
console.group('>>>>>> 错误信息 >>>>>>'); console.group('>>>>>> 错误信息 >>>>>>');
console.log(info); console.log(info);
console.groupEnd(); console.groupEnd();
@ -19,7 +19,7 @@ export default {
console.group('>>>>>> Error >>>>>>'); console.group('>>>>>> Error >>>>>>');
console.log(err); console.log(err);
console.groupEnd(); console.groupEnd();
} // }
}; };
}, },
}; };

@ -72,7 +72,7 @@ export default [
}, },
{ {
path: '/SCHEDULING_DASHBOARD', path: '/SCHEDULING_DASHBOARD',
component: () => import(/* webpackChunkName: "page" */ '@/views/productionSchedulingPlan/schedulingDashboard/index.vue'), component: () => import(/* webpackChunkName: "page" */ '@/views/productionSchedulingPlan/schedulingDashboard/container.vue'),
name: '排产看板', name: '排产看板',
meta: { meta: {
keepAlive: true, keepAlive: true,

@ -146,6 +146,10 @@ export default {
standardAttachId:this.ruleForm.standardValue == 6 ? this.fileList.length != 0 ? this.fileList.map(item => item.attachId).join(',') : '' : '', standardAttachId:this.ruleForm.standardValue == 6 ? this.fileList.length != 0 ? this.fileList.map(item => item.attachId).join(',') : '' : '',
cycleTestStandardName:this.ruleForm.standardValue == 6 ? this.ruleForm.cycleTestStandardName : '' cycleTestStandardName:this.ruleForm.standardValue == 6 ? this.ruleForm.cycleTestStandardName : ''
} }
if(this.ruleForm.standardValue == 6 && params.standardAttachId != '' && params.cycleTestStandardName == ''){
this.$message.error('请填写标准名称')
return
}
update(params).then(res => { update(params).then(res => {
// //
this.$message({ this.$message({
@ -164,6 +168,11 @@ export default {
standardAttachId:this.ruleForm.standardValue == 6 ? this.fileList.length != 0 ? this.fileList.map(item => item.attachId).join(',') : '' : '', standardAttachId:this.ruleForm.standardValue == 6 ? this.fileList.length != 0 ? this.fileList.map(item => item.attachId).join(',') : '' : '',
cycleTestStandardName:this.ruleForm.standardValue == 6 ? this.ruleForm.cycleTestStandardName : '' cycleTestStandardName:this.ruleForm.standardValue == 6 ? this.ruleForm.cycleTestStandardName : ''
} }
console.log('params---------------',params)
if(this.ruleForm.standardValue == 6 && params.standardAttachId != '' && params.cycleTestStandardName == ''){
this.$message.error('请填写标准名称')
return
}
add(params).then( add(params).then(
res => { res => {
// //
@ -179,6 +188,9 @@ export default {
} }
); );
} }
if(this.title == '详情'){
this.closeDialog()
}
} }
}); });
}, },

@ -272,6 +272,30 @@ export default {
gridBtn: false, gridBtn: false,
searchMenuPosition: 'right', searchMenuPosition: 'right',
column: [ column: [
{
label: '试验项目',
prop: 'cycleTestItemName',
search: false,
type: 'select',
sortable: true,
filter: true,
width: 200,
},
{
label: '试验条件',
prop: 'cycleTestItemCondition',
search: false,
sortable: true,
filter: true,
width: 200,
},
{
label: '试验标准',
prop: 'cycleTestStandardName',
search: false,
sortable: true,
width: 200,
},
{ {
label: '镀种', label: '镀种',
prop: 'plateName', prop: 'plateName',
@ -319,30 +343,7 @@ export default {
return res.data return res.data
}, },
}, },
{
label: '试验项目',
prop: 'cycleTestItemName',
search: false,
type: 'select',
sortable: true,
filter: true,
width: 200,
},
{
label: '试验条件',
prop: 'cycleTestItemCondition',
search: false,
sortable: true,
filter: true,
width: 200,
},
{
label: '试验标准',
prop: 'cycleTestStandardName',
search: false,
sortable: true,
width: 200,
},
{ {
label: '工艺员', label: '工艺员',

@ -19,7 +19,7 @@
@on-load="onLoad" @on-load="onLoad"
> >
<template #menu-left> <template #menu-left>
<el-button @click="handleIssue" type="primary" v-if="permission.issue_btn"> 批量下发 </el-button> <el-button @click="handleIssue" type="primary" v-if="permission.issue_btn"> 转派 </el-button>
</template> </template>
<template #menu-right="{ size }"> <template #menu-right="{ size }">
<el-button type="warning" plain @click="handleSearch(1)">临期</el-button> <el-button type="warning" plain @click="handleSearch(1)">临期</el-button>
@ -367,20 +367,24 @@ export default {
}, },
}, },
{ {
label: '工艺员', label: '临期天数',
prop: 'processUserName', prop: 'countDayToPlanedFinish',
search: false, search: false,
sortable: true, sortable: true,
editDisplay: false,
filter: true, filter: true,
addDisplay: false,
span: 24, span: 24,
width: 200, width: 200,
// dicUrl: '/blade-system/user/page?current=1&&size=99999', rules: [
props: { {
label: 'name', required: true,
value: 'id', message: '请输入临期天数',
res: 'data.records', trigger: 'blur',
}, },
],
}, },
// { // {
// label: '', // label: '',
// prop: 'mecMan', // prop: 'mecMan',
@ -431,22 +435,19 @@ export default {
// ], // ],
}, },
{ {
label: '临期天数', label: '工艺员',
prop: 'countDayToPlanedFinish', prop: 'processUserName',
search: false, search: false,
sortable: true, sortable: true,
editDisplay: false,
filter: true, filter: true,
addDisplay: false,
span: 24, span: 24,
width: 200, width: 200,
rules: [ // dicUrl: '/blade-system/user/page?current=1&&size=99999',
{ props: {
required: true, label: 'name',
message: '请输入临期天数', value: 'id',
trigger: 'blur', res: 'data.records',
}, },
],
}, },
{ {
label: '任务生成时间', label: '任务生成时间',
@ -609,11 +610,16 @@ export default {
handleIssue() { handleIssue() {
if (this.selectionList.length == 0) { if (this.selectionList.length == 0) {
this.$message.error('请至少选择一条数据'); this.$message.error('请至少选择一条数据');
} else { return
}
if(this.selectionList.find(item => item.status != 2)){
this.$message.error('请选择状态为【待接收】的数据')
return
}
this.issueType = 'all' this.issueType = 'all'
this.issueForm = {} this.issueForm = {}
this.issueDialog = true; this.issueDialog = true;
}
}, },
// //
handleSearch(val){ handleSearch(val){

@ -17,6 +17,7 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
:before-open="beforeOpen"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -170,7 +171,7 @@ export default {
}, },
{ {
label: '普通设备', label: '普通设备',
value: 1, value: '1',
}, },
], ],
}, },
@ -265,6 +266,14 @@ export default {
}; };
}, },
methods: { methods: {
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
// this.form.processId = this.form.processId+''
// this.form.craftId = this.form.craftId+''
this.form.workCenterId = this.form.workCenterId+''
}
done();
},
onChangeData(val, type) { onChangeData(val, type) {
if (val&&type == 'workCenterId') { if (val&&type == 'workCenterId') {
this.form.workCenterName = val.wcCode; this.form.workCenterName = val.wcCode;

@ -17,6 +17,8 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
:before-open="beforeOpen"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -191,6 +193,7 @@ export default {
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
width:250,
labelWidth: 220, labelWidth: 220,
type: 'number', type: 'number',
}, },
@ -210,6 +213,14 @@ export default {
}; };
}, },
methods: { methods: {
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
this.form.processId = this.form.processId+''
this.form.craftId = this.form.craftId+''
this.form.workCenterId = this.form.workCenterId+''
}
done();
},
onChangeData(val, type) { onChangeData(val, type) {
if (val && type == 'workCenterId') { if (val && type == 'workCenterId') {
this.form.workCenterName = val.wcName; this.form.workCenterName = val.wcName;

@ -17,6 +17,7 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
:before-open="beforeOpen"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -149,6 +150,15 @@ export default {
}; };
}, },
methods: { methods: {
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
this.form.processId = this.form.processId+''
// this.form.craftId = this.form.craftId+''
this.form.workCenterId = this.form.workCenterId+''
}
done();
},
onChangeData(val, type) { onChangeData(val, type) {
if (val&&type == 'processId') { if (val&&type == 'processId') {
this.form.processName = val.name; this.form.processName = val.name;

@ -17,6 +17,7 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
:before-open="beforeOpen"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -106,15 +107,15 @@ export default {
dicData:[ dicData:[
{ {
label:'军品', label:'军品',
value:1 value:'1'
}, },
{ {
label:'商飞', label:'商飞',
value:2 value:'2'
}, },
{ {
label:'宇航', label:'宇航',
value:3 value:'3'
} }
] ]
}, },
@ -126,6 +127,12 @@ export default {
}; };
}, },
methods: { methods: {
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
}
done();
},
rowSave(row, done, loading) { rowSave(row, done, loading) {
addGualityGrade(row).then( addGualityGrade(row).then(
() => { () => {

@ -0,0 +1,289 @@
<template>
<basic-container>
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-del="rowDel"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
:before-open="beforeOpen"
>
<template #menu-left> </template>
<template #menu-right> </template>
<template #menu="{ row }"> </template>
<template #heatTreat="scope"> </template>
</avue-crud>
</basic-container>
</template>
<script>
import {
getListSintTempCurve,
removeSintTempCurve,
addSintTempCurve,
updateSintTempCurve,
} from '@/api/productionSchedulingPlan/basic';
export default {
components: {},
data() {
return {
form: {},
selectionList: [],
query: {},
loading: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
columnSort: true,
tip: false,
height: 'auto',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
addBtn: true,
editBtn: true,
viewBtn: false,
delBtn: true,
editBtnText: '修改',
labelWidth: 120,
menuWidth: 120,
dialogWidth: 900,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
excelBtn: true,
showOverflowTooltip: true,
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
gridBtn: false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
align: 'center',
column: [
{
label: '工序',
prop: 'processId',
search: true,
sortable: true,
span: 12,
type: 'select',
filterable: true,
dicUrl: '/blade-scheduling/processSet/findList',
props: {
label: 'name',
value: 'id',
},
change: (val, row) => {
this.onChangeData(val.item, 'processId');
},
},
{
label: '工序',
prop: 'processName',
search: false,
sortable: true,
span: 12,
hide: true,
display: false,
},
{
label: '设备名称',
prop: 'equipName',
search: false,
sortable: true,
span: 12,
},
{
label: '设备分类',
prop: 'equipType',
search: false,
sortable: true,
span: 12,
type: 'select',
dicData: [
{
label: '产线设备',
value: '0',
},
{
label: '普通设备',
value: '1',
},
],
},
{
label: '玻璃粉牌号',
prop: 'glassCode',
search: false,
sortable: true,
span: 12,
},
{
label: '设定温度',
prop: 'temperature',
search: false,
sortable: true,
span: 12,
},
{
label: '备注',
prop: 'remarks',
search: false,
sortable: true,
span: 12,
},
],
},
data: [],
};
},
methods: {
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
this.form.processId = this.form.processId+''
// this.form.craftId = this.form.craftId+''
// this.form.workCenterId = this.form.workCenterId+''
}
done();
},
onChangeData(val, type) {
if (val && type == 'workCenterId') {
this.form.workCenterName = val.wcCode;
}
if (val && type == 'equipName') {
this.form.equipName = val.deviceName;
}
if (val && type == 'craftId') {
this.form.craftName = val.caName;
}
if (val && type == 'processId') {
this.form.processName = val.name;
}
},
rowSave(row, done, loading) {
addSintTempCurve(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
done();
},
error => {
window.console.log(error);
loading();
}
);
},
rowUpdate(row, index, done, loading) {
updateSintTempCurve(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
done();
},
error => {
window.console.log(error);
loading();
}
);
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return removeSintTempCurve(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getListSintTempCurve(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(
res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
this.selectionClear();
}
);
},
},
mounted() {},
};
</script>

@ -0,0 +1,15 @@
<template>
<basic-container>
<dashboardIndex></dashboardIndex>
</basic-container>
</template>
<script>
import dashboardIndex from "./container.vue";
export default {
components: { dashboardIndex },
data() {
return {};
},
methods: {}
};
</script>

@ -114,7 +114,7 @@ export default {
// span: 12, // span: 12,
// }, // },
{ {
label: '调度员', label: '计划员',
prop: 'planUser', prop: 'planUser',
search: false, search: false,
sortable: true, sortable: true,
@ -141,7 +141,7 @@ export default {
}, },
{ {
label: '订单优先级', label: '订单优先级',
prop: 'priorityAps', prop: 'priorityApsStr',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
@ -290,7 +290,7 @@ export default {
getYieldOrderList( getYieldOrderList(
page.currentPage, page.currentPage,
page.pageSize, page.pageSize,
Object.assign(params, this.query, { status: 6 }) Object.assign(params, this.query, { status: 10006 })
).then(res => { ).then(res => {
this.data = res.data.data.records; this.data = res.data.data.records;
this.loading = false; this.loading = false;

File diff suppressed because it is too large Load Diff

@ -17,7 +17,7 @@
<template #makeQty="{ row }">{{ row.prWorkPlan.prWorkOrder.makeQty }}</template> <template #makeQty="{ row }">{{ row.prWorkPlan.prWorkOrder.makeQty }}</template>
<template #factStartTime="{ row }">{{ row.prWorkPlan.factStartTime }}</template> <template #factStartTime="{ row }">{{ row.prWorkPlan.factStartTime }}</template>
<template #menu="{ row }"> <template #menu="{ row }">
<el-button type="text">生产监控</el-button> <!-- <el-button type="text">生产监控</el-button> -->
<el-button type="text" @click="handleResult(row)">检验结果</el-button> <el-button type="text" @click="handleResult(row)">检验结果</el-button>
</template> </template>
</avue-crud> </avue-crud>
@ -70,7 +70,10 @@
</el-row> </el-row>
</el-form> </el-form>
<el-table :data="vxeTableData" show-overflow-tooltip :row-class-name="getRowClass"> <el-table :data="vxeTableData" show-overflow-tooltip :row-class-name="getRowClass"
row-key="wpiId"
:expand-row-keys="expandedRowKeys"
@expand-change="handleExpandChange">
<el-table-column type="expand"> <el-table-column type="expand">
<template #default="scope"> <template #default="scope">
<el-table :data="vxeTableData5" show-overflow-tooltip v-if="scope.row.trialItem=='尺寸检测'" style="margin:12px"> <el-table :data="vxeTableData5" show-overflow-tooltip v-if="scope.row.trialItem=='尺寸检测'" style="margin:12px">
@ -192,10 +195,10 @@
<el-table-column v-if="dialogData.ppsName != '烧结包装防护'" label="测试值" prop="checkValue" align="center" width="150px"> <el-table-column v-if="dialogData.ppsName != '烧结包装防护'" label="测试值" prop="checkValue" align="center" width="150px">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.trialItem=='厚度检测'"> <div v-if="scope.row.trialItem=='厚度检测'">
<el-button @click="closeDialog" link type="primary">测厚数据</el-button> <el-button @click="testMeasurementData(scope.row,scope.$index)" link type="primary">测厚数据</el-button>
</div> </div>
<div v-else-if="scope.row.trialItem=='尺寸检测'"> <div v-else-if="scope.row.trialItem=='尺寸检测'">
<el-button @click="closeDialog" link type="primary">测试值填写</el-button> <el-button @click="testValue(scope.row,scope.$index)" link type="primary">测试值填写</el-button>
</div> </div>
<div v-else> <div v-else>
<el-input v-model="scope.row.checkValue"></el-input> <el-input v-model="scope.row.checkValue"></el-input>
@ -220,7 +223,7 @@
</el-table-column> </el-table-column>
<el-table-column label="检验结果" prop="checkQty" width="300px" align="center"> <el-table-column label="检验结果" prop="checkQty" width="300px" align="center">
<template #default="scope"> <template #default="scope">
<el-radio-group v-model="scope.row.checkQty"> <el-radio-group v-model="scope.row.checkQty" @change="(val) => changeQty(val,scope.$index)">
<el-radio :label="3">合格</el-radio> <el-radio :label="3">合格</el-radio>
<el-radio :label="6">不合格</el-radio> <el-radio :label="6">不合格</el-radio>
<el-radio :label="9">NA</el-radio> <el-radio :label="9">NA</el-radio>
@ -237,18 +240,16 @@
<el-table-column label="订单编码" prop="trialNo" align="center"></el-table-column> <el-table-column label="订单编码" prop="trialNo" align="center"></el-table-column>
<el-table-column label="零件号" prop="trialNo" align="center"></el-table-column> <el-table-column label="零件号" prop="trialNo" align="center"></el-table-column>
<el-table-column label="批次号" prop="trialNo" align="center"></el-table-column> <el-table-column label="批次号" prop="trialNo" align="center"></el-table-column>
<el-table-column label="生产标识" prop="trialNo" align="center"</el-table-column> <el-table-column label="生产标识" prop="trialNo" align="center"></el-table-column>
<el-table-column label="数量" prop="trialNo" align="center"></el-table-column> <el-table-column label="数量" prop="trialNo" align="center"></el-table-column>
<el-table-column label="面积(d㎡)" prop="trialNo" align="center"></el-table-column> <el-table-column label="面积(d㎡)" prop="trialNo" align="center"></el-table-column>
<el-table-column label="总面积(d㎡)" prop="trialNo" align="center"></el-table-column> <el-table-column label="总面积(d㎡)" prop="trialNo" align="center"></el-table-column>
<el-table-column label="材料" prop="trialNo" align="center"></el-table-column> <el-table-column label="材料" prop="trialNo" align="center"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="120"> <el-table-column fixed="right" label="操作" min-width="120">
<el-button link type="primary" @click="handleClick"> <template #default="scope">
查看 <el-button link type="primary" @click="handleView(scope.row)">查看</el-button>
</el-button> <el-button link type="primary" @click="handleUse(scope.row)">应用</el-button>
<el-button link type="primary" @click="handleClick"> </template>
应用
</el-button>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -277,20 +278,25 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="showDialog = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<sametank-view v-if="openView" :showDialog="openView" :tankId="tankId" @closeDialog="closeDialog"></sametank-view>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import sametankView from './components/sametankView.vue'
export default { export default {
components: { sametankView },
data() { data() {
return { return {
query:{},
openView:false,
loading: false, loading: false,
tankId:'',
form: {}, form: {},
showDialog: false, showDialog: false,
page: { page: {
@ -300,6 +306,7 @@
}, },
dialogData: {}, dialogData: {},
data: [], data: [],
expandedRowKeys:[],
vxeTableData: [], vxeTableData: [],
vxeTableData5: [], vxeTableData5: [],
vxeTableData2:[], vxeTableData2:[],
@ -343,6 +350,7 @@
menuAlign: 'left', menuAlign: 'left',
gridBtn: false, gridBtn: false,
searchMenuPosition: 'right', searchMenuPosition: 'right',
menuWidth: 100,
column: [ column: [
{ {
label: '流程卡号', label: '流程卡号',
@ -371,8 +379,7 @@
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 160,
}, },
{ {
label: '主加工单位-班组', label: '主加工单位-班组',
@ -380,7 +387,6 @@
search: true, search: true,
type: 'select', type: 'select',
searchLabelWidth: 120, searchLabelWidth: 120,
sortable: true, sortable: true,
filter: true, filter: true,
hide: true, hide: true,
@ -1628,7 +1634,7 @@
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 160,
rules: [ rules: [
{ {
required: true, required: true,
@ -1642,13 +1648,12 @@
prop: 'partCode', prop: 'partCode',
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 145,
rules: [ rules: [
{ {
required: true, required: true,
@ -1659,7 +1664,6 @@
}, },
{ {
label: '生产标识', label: '生产标识',
prop: 'prodIdent', prop: 'prodIdent',
search: true, search: true,
sortable: true, sortable: true,
@ -1668,7 +1672,7 @@
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 105,
rules: [ rules: [
{ {
required: true, required: true,
@ -1681,14 +1685,13 @@
label: '流程卡号', label: '流程卡号',
prop: 'cardNo', prop: 'cardNo',
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 110,
rules: [ rules: [
{ {
required: true, required: true,
@ -1702,13 +1705,12 @@
prop: 'needDept', prop: 'needDept',
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 120,
rules: [ rules: [
{ {
required: true, required: true,
@ -1722,13 +1724,12 @@
prop: 'batchNo', prop: 'batchNo',
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 120,
rules: [ rules: [
{ {
required: true, required: true,
@ -1742,13 +1743,12 @@
prop: 'subBatchNo', prop: 'subBatchNo',
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 120,
rules: [ rules: [
{ {
required: true, required: true,
@ -1760,7 +1760,6 @@
{ {
label: '当前工序', label: '当前工序',
prop: 'ppsName', prop: 'ppsName',
search: true, search: true,
type: 'select', type: 'select',
sortable: true, sortable: true,
@ -1769,7 +1768,7 @@
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 110,
rules: [ rules: [
{ {
required: true, required: true,
@ -2246,46 +2245,6 @@
}, },
] ]
}, },
{
label: '面积(dm²)',
prop: 'poArea',
search: false,
sortable: true,
filter: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
span: 24,
width: 200,
rules: [
{
required: true,
message: '请输入面积(dm²)',
trigger: 'blur',
},
],
},
{
label: '总面积(dm²)',
prop: 'totalArea',
search: false,
sortable: true,
filter: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
span: 24,
width: 200,
rules: [
{
required: true,
message: '请输入总面积(dm²)',
trigger: 'blur',
},
],
},
{ {
label: '下序', label: '下序',
prop: 'nextWorkPlan', prop: 'nextWorkPlan',
@ -2298,7 +2257,7 @@
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 110,
rules: [ rules: [
{ {
required: true, required: true,
@ -2776,87 +2735,127 @@
] ]
}, },
{ {
label: '生产数量', label: '状态',
prop: 'makeQty', prop: 'checkResultTitle',
search: true, search: true,
type: 'select',
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 90,
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入生产数量', message: '请输入状态',
trigger: 'blur', trigger: 'blur',
}, },
], ],
dicData: [
{
value: 1,
label: '合格'
}, {
value: 2,
label: '不合格'
}, },
{ {
label: '接收时间', value: 3,
prop: 'factStartTime', label: 'NA(不检验)'
search: true, },
type: 'date', {
searchRange: true, value: -1,
startPlaceholder: '开始时间', label: '未检验'
endPlaceholder: "结束时间", }
]
},
{
label: '面积(dm²)',
prop: 'poArea',
search: false,
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 120,
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入接收时间', message: '请输入面积(dm²)',
trigger: 'blur', trigger: 'blur',
}, },
], ],
}, },
{ {
label: '状态', label: '总面积(dm²)',
prop: 'checkResultTitle', prop: 'totalArea',
search: true, search: false,
type: 'select',
sortable: true, sortable: true,
filter: true, filter: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
viewDisplay: false, viewDisplay: false,
span: 24, span: 24,
width: 200, width: 150,
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入状态', message: '请输入总面积(dm²)',
trigger: 'blur', trigger: 'blur',
}, },
], ],
dicData: [
{
value: 1,
label: '合格'
}, {
value: 2,
label: '不合格'
}, },
{ {
value: 3, label: '生产数量',
label: 'NA(不检验)' prop: 'makeQty',
search: true,
sortable: true,
filter: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
span: 24,
width: 110,
rules: [
{
required: true,
message: '请输入生产数量',
trigger: 'blur',
},
],
}, },
{ {
value: -1, label: '接收时间',
label: '未检验' prop: 'factStartTime',
} search: true,
] type: 'date',
searchRange: true,
startPlaceholder: '开始时间',
endPlaceholder: "结束时间",
sortable: true,
filter: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
span: 24,
width: 200,
rules: [
{
required: true,
message: '请输入接收时间',
trigger: 'blur',
},
],
}, },
] ]
}, },
label_style: { label_style: {
@ -2887,6 +2886,71 @@
res.push('hide-row') res.push('hide-row')
return res.join(' ') */ return res.join(' ') */
}, },
testMeasurementData(row,index){
// if()
let tmp = this.expandedRowKeys.find(item => item.wpiId == row.wpiId)
if(!tmp){
this.expandedRowKeys = [...this.expandedRowKeys,row.wpiId]
}
},
testValue(row,index){
let tmp = this.expandedRowKeys.find(item => item.wpiId == row.wpiId)
if(!tmp){
this.expandedRowKeys = [...this.expandedRowKeys,row.wpiId]
}
},
// /
handleExpandChange(row, expandedRows) {
console.log('当前展开的行:', expandedRows);
// 使 .sync expandedRowKeys
this.expandedRowKeys = expandedRows.map(r => r.wpiId);
},
changeQty(val,index){
if(val == 3 && (this.vxeTableData[index].checkValue == '不合格' || !this.vxeTableData[index].checkValue)){
this.vxeTableData[index].checkValue = '合格'
}
if(val == 6 && (this.vxeTableData[index].checkValue == '合格' || !this.vxeTableData[index].checkValue)){
this.vxeTableData[index].checkValue = '不合格'
}
if(val == 9){
this.vxeTableData[index].checkValue = null
}
},
//
handleUse(row){
this.$confirm('是否应用此同槽检测结果?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
})
},
//
handleView(row){
this.tankId = '123123'
this.openView = true
console.log('oprn---------------',this.openView)
},
closeDialog(){
this.openView = false
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad();
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
handleResult(row) { handleResult(row) {
this.dialogData = { this.dialogData = {
"approvalStatus": 1, "approvalStatus": 1,
@ -4409,7 +4473,7 @@
"keyValue": 1742, "keyValue": 1742,
"lastInstoreTime": null, "lastInstoreTime": null,
"lossQty": 0, "lossQty": 0,
"mainProcessingUnit": "L235", "mainProcessingUnit": "化学镀镍一班郭家梁",
"makeQty": 105.0, "makeQty": 105.0,
"makeTeam": null, "makeTeam": null,
"makeUnit": "L235", "makeUnit": "L235",
@ -17744,7 +17808,7 @@
"checkResultTitle": "未检验", "checkResultTitle": "未检验",
"keyValue": 1662, "keyValue": 1662,
"lossQty": 0, "lossQty": 0,
"mainProcessingUnit": "L235", "mainProcessingUnit": "化学镀镍一班郭家梁",
"poorMemo": null, "poorMemo": null,
"poorReason": null, "poorReason": null,
"prWorkPlan": { "prWorkPlan": {

@ -0,0 +1,346 @@
<template>
<el-dialog title="新增" append-to-body :modelValue="openShow" width="70%" @close="closeDialog">
<div style="margin-bottom: 12px">
<el-button type="primary" @click="addTable">插入一行</el-button>
<el-button type="danger" @click="delTable">删除选中行</el-button>
</div>
<!-- 单个 Form 包裹整个表格 -->
<el-form
ref="tableForm"
:model="form"
:rules="formRules"
label-width="0px"
>
<!-- 全局错误提示 -->
<div v-if="formError" class="error-message" style="color: #f56c6c; margin-bottom: 10px;">
{{ formError }}
</div>
<el-table :data="form.tableData" @select="selectChange" border>
<el-table-column type="selection" width="55"></el-table-column>
<!-- 作业中心绑定数组字段 -->
<el-table-column align="center" label="模板名称">
<template #header>
<span><i style="color: red">*</i>模板名称</span>
</template>
<template #default="scope">
<!-- prop 格式数组名[索引].字段名 -->
<!-- 模板名称 -->
<el-form-item :prop="`tableData[${scope.$index}].name`" :rules="formRules.name">
<el-input v-model="scope.row.name" ></el-input>
<!-- <el-select
v-model="scope.row.name"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="item in wcData"
:key="item.id"
:value="item.id"
:label="item.wcName"
></el-option>
</el-select> -->
</el-form-item>
</template>
</el-table-column>
<!-- 作业中心 -->
<el-table-column align="center" label="作业中心">
<template #header>
<span><i style="color: red">*</i>作业中心</span>
</template>
<template #default="scope">
<el-form-item :prop="`tableData[${scope.$index}].wcId`" :rules="formRules.wcId">
<el-select
v-model="scope.row.wcId"
placeholder="请选择"
style="width: 100%"
>
<el-option v-for="item in workList" :key="item.id" :label="item.wcName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<!-- 工序 -->
<el-table-column align="center" label="工序">
<template #header>
<span><i style="color: red">*</i>工序</span>
</template>
<template #default="scope">
<el-form-item :prop="`tableData[${scope.$index}].ppsId`" :rules="formRules.ppsId">
<el-select
v-model="scope.row.ppsId"
remote
:remote-method="remoteMethod"
:loading="loading"
reserve-keyword
clearable
filterable
placeholder="请输入并搜索工序"
style="width: 100%"
>
<el-option
v-for="item in processList"
:key="item.id"
:label="item.processName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<!-- 线上/ -->
<el-table-column align="center" label="线上/下">
<template #default="scope">
<el-form-item :prop="`tableData[${scope.$index}].line`" :rules="formRules.line">
<div style="width:100%;display: flex;justify-content: center;">
<el-switch
v-model="scope.row.line"
size="large"
active-text="线上"
inactive-text="线下"
/>
</div>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
// import { getWorkCenterList } from '@/api/processManagement/addQuantity.js';
// // import { submitBatchData } from '@/api/processManagement/periodical.js'; //
import {getWorkList,getProcessList,addRecords} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve'
export default {
props: {
showDialog: { type: Boolean, default: false },
moldAddMore: { type: Boolean, default: false },
tabPosition: { type: String, default: '' },
},
data() {
return {
openShow: false,
wcData: [],
workList:[],
processList: [], //
loading: false, //
formError: '', //
//
form: {
tableData: [] // Form
},
//
formRules: {
// 1
tableData: [
{
required: true,
message: '请至少添加一行数据',
trigger: 'submit',
type: 'array' //
},
{
validator: (rule, value, callback) => {
if (value.length === 0) {
callback(new Error('请至少添加一行数据'));
} else {
callback();
}
},
trigger: 'submit'
}
],
// name
name: [
{ required: true, message: '请输入模板名称', trigger: ['change', 'submit'] }
],
// wcId
wcId: [
{
required: true,
message: '请选择作业中心',
trigger: ['change', 'submit']
}
],
// ppsId
ppsId: [
{ required: true, message: '请选择工序', trigger: ['blur', 'submit'] },
]
}
};
},
mounted() {
this.openShow = this.showDialog;
this.getWorkCenterList();
//
if (this.moldAddMore && this.form.tableData.length === 0) {
this.addTable();
}
},
methods: {
getWorkCenterList() {
getWorkList().then(res => {
this.workList = res.data.data || [];
});
},
selectChange(list, row) {
row._select = !row._select;
},
// push tableData
addTable() {
this.form.tableData.push({
_select: false, //
name: '', // ID
wcId: '', // /
ppsId: '' //
});
},
remoteMethod(query){
console.log('query---------------',query)
if (!query.trim()) {
this.processList = [];
return;
}
if (query) {
this.loading = true
getProcessList({
processName:query
}).then(res =>{
this.processList = res.data.data.records;
this.loading = false
})
} else {
this.processList = [];
}
},
//
delTable() {
this.form.tableData = this.form.tableData.filter(row => !row._select);
},
closeDialog() {
this.openShow = false;
this.$emit('closeDialog');
//
this.form.tableData = [];
this.formError = '';
this.$refs.tableForm?.resetFields();
},
//
submitForm() {
this.formError = '';
// Form
this.$refs.tableForm.validate((isValid, invalidFields) => {
if (!isValid) {
//
this.formError = '存在未完善的字段,请检查表格中的红色提示';
this.$nextTick(() => {
//
const firstError = document.querySelector('.el-form-item.is-error');
if (firstError) {
firstError.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
});
return;
}
//
const submitData = this.form.tableData.map(row => {
const { _select, ...validData } = row; //
return validData;
});
//
try {
// const res = await submitBatchData(submitData);
// if (res.code === 200) {
// this.$message.success('');
// this.closeDialog();
// this.$emit('submitSuccess', submitData);
// } else {
// this.$message.error(res.msg || '');
// }
// //
// this.$message.success('');
// this.closeDialog();
// this.$emit('submitSuccess', submitData);
submitData.map(item => {
item.line = item.line ? 1 : 0
})
console.log('submitData',submitData)
addRecords(submitData).then(res => {
if(res.data.code === 200){
this.$message.success('新增成功');
this.closeDialog();
}
})
} catch (err) {
this.$message.error('网络错误,请稍后重试');
console.error('提交失败:', err);
}
});
}
},
};
</script>
<style lang="scss" scoped>
//
:deep(.el-table .el-form-item) {
margin-bottom: 0; //
}
//
:deep(.el-form-item__error) {
font-size: 12px;
white-space: nowrap;
z-index: 10;
background: #fff;
padding: 2px 4px;
border: 1px solid #f56c6c;
border-radius: 4px;
}
// textarea
.el-table__row {
height: 80px !important;
}
.el-table__cell {
vertical-align: middle !important;
}
.error-message {
font-size: 14px;
line-height: 1.5;
}
:deep(.el-table .el-table__cell) {
height: 50px !important;
padding: 0 !important;
line-height: 50px !important;
}
</style>

@ -440,6 +440,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {getWordDetail} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve'
export default { export default {
props: { props: {
detailOpen: { detailOpen: {
@ -460,6 +461,7 @@ export default {
mounted(){ mounted(){
console.log(9999,this.detailOpen) console.log(9999,this.detailOpen)
this.detailOpenshow = this.detailOpen this.detailOpenshow = this.detailOpen
this.open()
}, },
methods: { methods: {
open() { open() {
@ -471,6 +473,16 @@ export default {
// this.rightList = preserveSlotList; // this.rightList = preserveSlotList;
// } // }
// }); // });
console.log('rfId-------------',this.rfpId)
if(this.rfpId){
getWordDetail({
id:this.rfpId
}).then(res =>{
console.log('res-------------',res)
this.rightList = res.data.data.preserveSlotList
console.log('this.rightList-------------',this.rightList)
})
}
}, },
cancel(isRefresh) { cancel(isRefresh) {
this.rightList = []; this.rightList = [];

@ -19,27 +19,30 @@
@on-load="onLoad" @on-load="onLoad"
:permission="getPermission" :permission="getPermission"
> >
<template #menu-left> </template> <template #menu-left>
<el-button type="primary" @click="handleAdd">新增</el-button>
</template>
<template #menu-right> <template #menu-right>
<el-button type="primary" @click="handleImport()">导入</el-button> <el-button type="primary" @click="handleImport()">导入</el-button>
</template> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="text" @click="copyClick(scope.row.rfpId)">复制</el-button> <el-button type="text" @click="copyClick(scope.row)">复制</el-button>
<!-- <el-button <!-- <el-button
type="text" type="text"
@click="upgradedVersion(scope.row.rfpId)" @click="upgradedVersion(scope.row.rfpId)"
v-if="scope.row.rfpStatus == 2 && scope.row.approvalStatus == 1" v-if="scope.row.rfpStatus == 2 && scope.row.approvalStatus == 1"
>升版</el-button >升版</el-button
> --> > -->
<!-- v-if="
(scope.row.rfpStatus == 1 || scope.row.rfpStatus == 4) && scope.row.approvalStatus != 0
" -->
<el-button <el-button
type="text" type="text"
@click="templatePreserve(scope.row.rfpId)" @click="templatePreserve(scope.row)"
v-if="
(scope.row.rfpStatus == 1 || scope.row.rfpStatus == 4) && scope.row.approvalStatus != 0
"
>维护电子档案</el-button >维护电子档案</el-button
> >
<el-button type="text" @click="detailClick(scope.row.rfpId)">电子档案详情</el-button> <el-button type="text" @click="detailClick(scope.row)">电子档案详情</el-button>
</template> </template>
<template #line="{ row }"> <template #line="{ row }">
<el-tag v-if="row.line == 0">线上</el-tag> <el-tag v-if="row.line == 0">线上</el-tag>
@ -69,6 +72,9 @@
> >
</templatePreserve> </templatePreserve>
<!-- 批量新增 -->
<addPreserve @closeDialog="closeDialog" :showDialog="showDialog" v-if="showDialog"></addPreserve>
<!-- <editTable></editTable> --> <!-- <editTable></editTable> -->
<!-- 导入 --> <!-- 导入 -->
@ -85,13 +91,14 @@
</template> </template>
<script> <script>
import {getList,addRecords, editRecords,deleteRecords} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve' import {getList,addRecords, editRecords,deleteRecords,copyData} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve'
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import detailRb from './detailRb.vue'; import detailRb from './detailRb.vue';
import templatePreserve from './templatePreserve.vue'; import templatePreserve from './templatePreserve.vue';
import approvalStandard from '@/views/oem/components/approval/index.vue'; import approvalStandard from '@/views/oem/components/approval/index.vue';
import editTable from './editTable.vue'; import editTable from './editTable.vue';
import basicImport from '@/components/basic-import/main.vue'; import basicImport from '@/components/basic-import/main.vue';
import addPreserve from './addPreserve.vue';
export default { export default {
components: { components: {
detailRb, detailRb,
@ -99,10 +106,12 @@ export default {
approvalStandard, approvalStandard,
editTable, editTable,
basicImport, basicImport,
addPreserve
}, },
data() { data() {
return { return {
isShowImport: false, isShowImport: false,
showDialog:false,
data: [], data: [],
page: { page: {
pageSize: 10, pageSize: 10,
@ -128,7 +137,7 @@ export default {
selection: false, selection: false,
viewBtn: false, viewBtn: false,
editBtn: true, editBtn: true,
addBtn: true, addBtn: false,
delBtn: true, delBtn: true,
editBtnText: '修改', editBtnText: '修改',
viewBtnText: '详情', viewBtnText: '详情',
@ -199,27 +208,34 @@ export default {
span: 24, span: 24,
type: 'select', type: 'select',
filterable: true, filterable: true,
dicData: [ remote: true,
{ dicUrl:`/api/blade-desk/dsProcess/list?processName={{key}}`,
label: '工序一', props:{
value: 1, label: 'processName',
}, value: 'id',
{ res: 'data.records',
label: '工序二',
value: 2,
},
{
label: '工序三',
value: 3,
}, },
], // dicData: [
// rules: [
// { // {
// required: true, // label: '',
// message: '', // value: 1,
// trigger: 'click', // },
// {
// label: '',
// value: 2,
// },
// {
// label: '',
// value: 3,
// }, // },
// ], // ],
rules: [
{
required: true,
message: '请选择工序',
trigger: 'click',
},
],
}, },
{ {
label: '线上/线下', label: '线上/线下',
@ -271,20 +287,25 @@ export default {
filter: true, filter: true,
display: false, display: false,
type: 'select', type: 'select',
dicData: [ dicUrl:'/api/blade-system/dict/dictionary?code=ProReTemplate-Status',
{ props:{
label: '新建', label: 'dictValue',
value: '1', value: 'dictKey',
}, }
{ // dicData: [
label: '使用中', // {
value: '2', // label: '',
}, // value: '1',
{ // },
label: '作废', // {
value: '3', // label: '使',
}, // value: '2',
], // },
// {
// label: '',
// value: '3',
// },
// ],
}, },
{ {
label: '审批状态', label: '审批状态',
@ -294,20 +315,25 @@ export default {
filter: true, filter: true,
display: false, display: false,
type: 'select', type: 'select',
dicData: [ dicUrl:'/api/blade-system/dict/dictionary?code=ProReTemplate-ApprovalStatus',
{ props:{
label: '审批中', label: 'dictValue',
value: '1', value: 'dictKey',
}, }
{ // dicData: [
label: '审批通过', // {
value: '2', // label: '',
}, // value: '1',
{ // },
label: '审批不通过', // {
value: '3', // label: '',
}, // value: '2',
], // },
// {
// label: '',
// value: '3',
// },
// ],
}, },
], ],
}, },
@ -326,28 +352,36 @@ export default {
handleImport() { handleImport() {
this.isShowImport = true this.isShowImport = true
}, },
//
handleAdd(){
this.showDialog = true
},
closeDialog(){
this.showDialog = false
},
getPermission(key, row, index) { getPermission(key, row, index) {
if (key === 'editBtn') { if (key === 'editBtn') {
return row.rfpStatus == 1 && (row.approvalStatus == -1 || row.approvalStatus == 4) // return row.rfpStatus == 1 && (row.approvalStatus == -1 || row.approvalStatus == 4)
? true
: false;
} else if (key === 'delBtn') {
// return (row.rfpStatus == 1 && (row.approvalStatus == 1 || row.approvalStatus == -1)) ||
// (row.rfpStatus == 2 && row.approvalStatus == 1)
// ? true // ? true
// : false; // : false;
return true return true
} else if (key === 'delBtn') {
return (row.rfpStatus == 1 && (row.approvalStatus == 1 || row.approvalStatus == -1)) ||
(row.rfpStatus == 2 && row.approvalStatus == 1)
? true
: false;
// return true
} }
return true; return true;
}, },
// //
detailClick(rfpId) { detailClick(row) {
this.rfpId = rfpId; this.rfpId = row.id;
this.detailOpen = true; this.detailOpen = true;
}, },
// //
templatePreserve(rfpId) { templatePreserve(row) {
this.rfpId = rfpId; this.rfpId = row.id;
this.templateOpen = true; this.templateOpen = true;
}, },
// //
@ -378,16 +412,31 @@ export default {
}); });
}, },
// //
async copyClick(rfpId) { async copyClick(row) {
this.$confirm('确定复制此条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
copyData({
id:row.id
}).then(res =>{
if(res.data.code == 200){
this.$message.success('复制成功')
this.onLoad()
}
})
})
// const res = await this.$ajax.post('dsRbFilePreserve/upgradedVersion', { // const res = await this.$ajax.post('dsRbFilePreserve/upgradedVersion', {
// rfpId, // rfpId,
// copy: true // copy: true
// }); // });
// if (this.$ifAjax(res)) { // if (this.$ifAjax(res)) {
this.$message({ // this.$message({
type: 'success', // type: 'success',
message: '复制成功!', // message: '!',
}); // });
// this.$refs.myTable.load(); // this.$refs.myTable.load();
// } // }
}, },
@ -472,9 +521,11 @@ export default {
}, },
onLoad() { onLoad() {
this.loading = true; this.loading = true;
console.log('this.query',this.query)
getList({ getList({
current:this.page.currentPage, current:this.page.currentPage,
size:this.page.pageSize size:this.page.pageSize,
...this.query
}).then(res =>{ }).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.data.map(item =>{ this.data.map(item =>{

@ -1479,6 +1479,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {editTable,deleteTable,getWordDetail} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve'
export default { export default {
props: { props: {
templateOpen: { templateOpen: {
@ -1527,6 +1528,10 @@ export default {
this.getDate(); this.getDate();
}, },
getDate() { getDate() {
getWordDetail({id:this.rfpId}).then(res =>{
this.rightList = res.data.data.preserveSlotList
this.insertIndex = res.data.datainsertIndex;
})
// this.$ajax // this.$ajax
// .get('dsRbFilePreserveSlot/getByRfpId/' + this.rfpId) // .get('dsRbFilePreserveSlot/getByRfpId/' + this.rfpId)
// .then((res) => { // .then((res) => {
@ -2304,28 +2309,48 @@ export default {
}, },
deleteRow(index) { deleteRow(index) {
const row = this.rightList[index]; const row = this.rightList[index];
if (row.rfpsId) { console.log('row----------------',row)
this.deleteIds.push(row.rfpsId); if (row.id) {
// this.deleteIds.push(row.rfpsId);
deleteTable({
tankId:row.id
}).then(res =>{
})
} }
this.rightList.splice(index, 1); this.rightList.splice(index, 1);
}, },
saveClick(flag) { saveClick(flag) {
this.$ajax // this.$ajax
.post('dsRbFilePreserveSlot/saveOrEdit', { // .post('dsRbFilePreserveSlot/saveOrEdit', {
rfpId: this.rfpId, // rfpId: this.rfpId,
submitList: this.rightList, // submitList: this.rightList,
deleteIds: this.deleteIds // deleteIds: this.deleteIds
}) // })
.then((res) => { // .then((res) => {
if (this.$ifAjax(res)) { // if (this.$ifAjax(res)) {
this.$message.success('保存成功'); // this.$message.success('');
// if (flag) {
// this.cancel(true);
// } else {
// this.getDate();
// }
// }
// });
editTable({
id:this.rfpId,
preserveSlotList:this.rightList
}).then(res =>{
if(res.data.code == 200){
this.$message.success('保存成功')
if (flag) { if (flag) {
this.cancel(true); this.cancel(true);
} else { } else {
this.getDate(); this.getDate();
} }
} }
}); })
console.log('this.rightList-----------',this.rightList)
}, },
cancel(isRefresh) { cancel(isRefresh) {
this.rightList = []; this.rightList = [];

@ -0,0 +1,196 @@
<template>
<div class="form-table-demo">
<el-form
ref="formRef"
:model="form"
:rules="formRules"
label-width="100px"
>
<!-- 其他表单字段可选 -->
<el-form-item label="表单名称" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
<!-- 表格嵌套绑定到form的tableData数组 -->
<el-form-item label="日期列表" prop="tableData">
<el-table
:data="form.tableData"
border
style="width: 100%; margin-top: 10px"
@row-click="handleRowClick"
>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="日期" prop="date">
<template #default="scope">
<!-- 表格行内的日期选择器绑定到行数据的date字段 -->
<el-date-picker
v-model="scope.row.date"
type="date"
placeholder="选择日期"
style="width: 100%"
@change="() => validateSingleRow(scope.row)"
></el-date-picker>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template #default="scope">
<el-button
type="text"
icon="el-icon-delete"
@click="handleDeleteRow(scope.$index)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加行按钮 -->
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
style="margin-top: 10px"
@click="handleAddRow"
>
添加行
</el-button>
</el-form-item>
<!-- 提交按钮 -->
<el-form-item>
<el-button type="primary" @click="handleSubmit">提交</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: "FormTableDateCheck",
data() {
//
const validateDateRequired = (rule, value, callback) => {
// date
const hasEmpty = value.some((row) => !row.date);
if (hasEmpty) {
callback(new Error("请填写所有行的日期"));
} else {
//
this.$refs.formRef.clearValidate("tableData");
callback();
}
};
//
const validateDateDuplicate = (rule, value, callback) => {
if (value.length === 0) {
callback();
return;
}
//
const dateList = value
.map((row) => (row.date ? this.formatDate(row.date) : ""))
.filter((date) => date);
//
const isDuplicate = dateList.length !== new Set(dateList).size;
if (isDuplicate) {
callback(new Error("表格中存在重复的日期,请修改"));
} else {
callback();
}
};
return {
//
form: {
name: "", //
tableData: [
//
{ date: "" },
],
},
//
formRules: {
name: [
{ required: true, message: "请输入表单名称", trigger: "blur" },
],
tableData: [
{ required: true, validator: validateDateRequired, trigger: "change" },
{ validator: validateDateDuplicate, trigger: "change" },
],
},
};
},
methods: {
// Date
formatDate(date) {
if (typeof date === "string") return date;
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
},
//
validateSingleRow(row) {
this.$refs.formRef.validateField("tableData");
},
//
handleAddRow() {
this.form.tableData.push({ date: "" });
//
this.$nextTick(() => {
this.$refs.formRef.validateField("tableData");
});
},
//
handleDeleteRow(index) {
this.form.tableData.splice(index, 1);
//
this.$nextTick(() => {
this.$refs.formRef.validateField("tableData");
});
},
//
handleSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
//
alert("表单校验通过,可提交数据");
console.log("表单数据:", this.form);
} else {
// ElementUI
console.log("表单校验失败");
return false;
}
});
},
//
handleReset() {
this.$refs.formRef.resetFields();
//
this.form.tableData = [{ date: "" }];
},
//
handleRowClick(row) {
console.log("点击行数据:", row);
},
},
};
</script>
<style scoped>
.form-table-demo {
padding: 20px;
}
</style>
Loading…
Cancel
Save