外协模块接口联调

dev-scheduling
jinna 1 month ago
parent 4078a86726
commit dd21b2bd7f
  1. 26
      src/api/outsourcingManagement/baseTemplate.js
  2. 29
      src/api/outsourcingManagement/performanceApplication.js
  3. 191
      src/views/oem/baseTemplate/components/maintenanceDialog.vue
  4. 18
      src/views/oem/baseTemplate/index.vue
  5. 522
      src/views/oem/performanceApplication/components/addQuality.vue
  6. 363
      src/views/oem/performanceApplication/index.vue

@ -9,3 +9,29 @@ export const getList = params => {
params params
}); });
}; };
// 工艺能力下拉
export const getAbility = params => {
return request({
url: '/api/blade-desk/BA/craftAbility/findList',
method: 'get',
params
});
};
// 外协厂商下拉
export const getOutsourcing = () =>{
return request({
url:'/api/blade-desk/BA/Oem/listForSelect',
method:'get'
})
}
// 批量增删改
export const saveRules = data => {
return request({
url: '/api/blade-desk/mesOemAndAbility/submit-list',
method: 'post',
data
});
};

@ -0,0 +1,29 @@
// 外协厂家绩效
import request from '@/axios';
// 获取列表
export const getList = params => {
return request({
url: '/api/blade-desk/mesOemMerits/page',
method: 'get',
params
});
};
// 外协绩效申请
export const performanceApply = data => {
return request({
url: '/api/blade-desk/mesOemMerits/submit',
method: 'post',
data
});
};
// 外协绩效申请删除
export const performanceApplyDel = params => {
return request({
url: '/api/blade-desk/mesOemMerits/remove',
method: 'post',
params
});
};

@ -1,33 +1,54 @@
<template> <template>
<el-dialog title="批量维护" append-to-body :modelValue="openShow" width="50%" @close="closeDialog" fullscreen> <el-dialog title="批量维护" append-to-body :modelValue="openShow" width="50%" @close="closeDialog(false)" fullscreen>
<div style="margin-bottom: 12px;"> <div style="margin-bottom: 12px;">
<el-button type="primary" @click="addTable">插入一行</el-button> <el-button type="primary" @click="addTable">插入一行</el-button>
<el-button type="danger" @click="delTable">删除</el-button> <el-button type="danger" @click="handleDelete">删除选择行</el-button>
</div> </div>
<el-table :data="tableData" style="width: 100%"> <!-- 单个 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" style="width: 100%">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" width="80" label="序号" align="center"> <!-- <el-table-column type="index" width="80" label="序号" align="center">
</el-table-column> </el-table-column> -->
<el-table-column prop="shuliang" label="镀种小类" align="center" > <el-table-column prop="caId" label="工艺能力" align="center" >
<template #header>
<span><i style="color: red">*</i>工艺能力</span>
</template>
<template #default="scope"> <template #default="scope">
<!-- <el-input v-model="scope.row.shuliang" size="small" controls-position="right" <!-- <el-input v-model="scope.row.shuliang" size="small" controls-position="right"
@change="handleChange" /> --> @change="handleChange" /> -->
<el-select v-model="scope.row.changjia" multiple placeholder="请选择" style="width: 50%;" collapse-tags > <el-form-item :prop="`tableData[${scope.$index}].caId`" :rules="formRules.caId">
<el-option label="镀金" :value="1" value-key="value" /> <el-select v-model="scope.row.caId" placeholder="请选择" style="margin:0 auto;margin-top:15px;" >
<el-option label="镀铬" :value="2" value-key="value" /> <el-option v-for="item in abilityList" :key="item.id" :label="item.caName" :value="item.id" value-key="value" />
<!-- <el-option label="镀铬" :value="2" value-key="value" /> -->
</el-select> </el-select>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="shuliang" label="厂家" align="center" > <el-table-column prop="ocId" label="厂家" align="center" >
<template #header>
<span><i style="color: red">*</i>厂家</span>
</template>
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.changjia" multiple placeholder="请选择" style="width: 50%;" collapse-tags > <el-form-item :prop="`tableData[${scope.$index}].ocId`" :rules="formRules.ocId">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item" value-key="value" /> <el-select v-model="scope.row.ocId" placeholder="请选择" style="margin:0 auto;margin-top:15px;" >
<el-option v-for="item in outOptions" :key="item.id" :label="item.ocName" :value="item.id" value-key="value" />
</el-select> </el-select>
<div style="margin: 12px 0 12px 0;" v-for="tag in scope.row.changjia"> </el-form-item>
<!-- <div style="margin: 12px 0 12px 0;" v-for="tag in scope.row.ocId">
<el-tag :key="tag.name" closable :type="tag.type" @close="changeChangjia(tag,scope.$index)"> <el-tag :key="tag.name" closable :type="tag.type" @close="changeChangjia(tag,scope.$index)">
{{ tag.label }}({{ tag.value }}) {{ tag.label }}({{ tag.value }})
</el-tag> </el-tag>
</div> </div> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="100" align="left"> <el-table-column fixed="right" label="操作" width="100" align="left">
@ -37,16 +58,18 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog(true)"> </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>
</template> </template>
<script> <script>
import {getAbility,getOutsourcing,saveRules} from "@/api/outsourcingManagement/baseTemplate"
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -61,61 +84,131 @@ export default {
data() { data() {
return { return {
openShow: false, openShow: false,
form:{
tableData: [], tableData: [],
options: [
{
label: '厂家一',
value: '1'
},
{
label: '厂家2',
value: '2'
},
{
label: '厂家3',
value: '3'
}, },
formRules:{
tableData: [
{ {
label: '厂家4', required: true,
value: '4' message: '请至少添加一行数据',
trigger: 'submit',
type: 'array' //
}, },
{ {
label: '厂家5', validator: (rule, value, callback) => {
value: '5' if (value.length === 0) {
callback(new Error('请至少添加一行数据'));
} else {
callback();
}
}, },
{ trigger: 'submit'
label: '厂家6', }
value: '6' ],
// wcId
ocId: [
{ required: true, message: '请选择厂家', trigger: ['change', 'submit'] }
],
caId: [
{ required: true, message: '请选择工艺能力', trigger: ['change', 'submit'] }
],
}, },
] abilityList:[],
outOptions: [],
formError:'',
deleteArr:[],
} }
}, },
mounted() { async mounted() {
let abilityRes = await getAbility()
this.abilityList = abilityRes.data.data
let outRes = await getOutsourcing()
this.outOptions = outRes.data.data
this.form.tableData = this.list
this.form.tableData.map(item =>{
item.caId = item.caId && item.caId + '',
item._select = false
})
console.log('table-------------',this.form.tableData)
this.openShow = this.showDialog this.openShow = this.showDialog
this.tableData = this.list
}, },
methods: { methods: {
closeDialog() { closeDialog(val) {
this.openShow = false this.openShow = false
this.$emit('closeDialog'); this.$emit('closeDialog',val);
}, },
addTable() { addTable() {
this.tableData.push({ this.form.tableData.push({
code: '3', _select:false,
No: '3', caId: '',
number: '3', ocId: '',
shuliang: '',
shuliang: 0,
changjia: []
}) })
}, },
selectChange(list,row){
row._select = !row._select;
},
delTable(row, index) { delTable(row, index) {
this.tableData.splice(index, 1) this.form.tableData.splice(index, 1)
this.deleteArr.push(row)
},
handleDelete(){
let tmp = this.form.tableData.find(item => item._select)
console.log('tmp',tmp)
if(!tmp){
this.$message.error('请选择要删除的行!')
return
}
let deleteData = this.form.tableData.filter(item => item._select)
this.deleteArr = [...this.deleteArr, ...deleteData]
this.form.tableData = this.form.tableData.filter(item => !item._select)
}, },
changeChangjia(value,index){ changeChangjia(value,index){
console.log(value,index) console.log(value,index)
this.tableData[index].changjia.splice(index, 1) this.form.tableData[index].changjia.splice(index, 1)
},
submit(){
this.formError = '';
// Form
this.$refs.tableForm.validate((isValid, invalidFields) => {
console.log('isValid---------',isValid)
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;
});
console.log('submitData',submitData)
console.log('deleteArr',this.deleteArr)
const ids = this.deleteArr
.filter(item => item.id && item.id !== undefined && item.id !== null)
.map(item => item.id);
console.log('ids-----------',ids)
saveRules({
deleteIds:ids.join(','),
oemAndAbilityEntities:submitData
}).then(res =>{
if(res.data.code == 200){
this.$message.success('维护成功');
this.closeDialog(true);
}
})
})
} }
} }
} }

@ -22,14 +22,14 @@
<maintenanceDialog v-if="isOpen" :showDialog="isOpen" @closeDialog="closeDialog" :list="data"> <maintenanceDialog v-if="isOpen" :showDialog="isOpen" @closeDialog="closeDialog" :list="data">
</maintenanceDialog> </maintenanceDialog>
<basic-import v-if="isShowImport" title="导入" :isShow="isShowImport" <basic-import v-if="isShowImport" title="导入" :isShow="isShowImport"
templateUrl="/blade-oem/oem/baseTemplate/download-template" templateUrl="/blade-desk/mesOemAndAbility/downloadExcelTemplate"
templateName="OEM基础模板.xlsx" templateName="外协绩效模板.xlsx"
importUrl="/blade-oem/oem/baseTemplate/import-excel" importUrl="/blade-desk/mesOemAndAbility/importExcel"
@closeDialog="closeDialog"></basic-import> @closeDialog="closeDialog"></basic-import>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList} from "@/api/outsourcingManagement/baseTemplate" import {getList,} from "@/api/outsourcingManagement/baseTemplate"
import maintenanceDialog from './components/maintenanceDialog.vue' import maintenanceDialog from './components/maintenanceDialog.vue'
import basicImport from '@/components/basic-import/main.vue' import basicImport from '@/components/basic-import/main.vue'
export default { export default {
@ -94,7 +94,7 @@ export default {
column: [ column: [
{ {
label: '工艺能力', label: '工艺能力',
prop: 'plate', prop: 'caId',
sortable: true, sortable: true,
filter: true, filter: true,
span: 12, span: 12,
@ -116,7 +116,7 @@ export default {
}, },
{ {
label: '厂家', label: '厂家',
prop: 'ocName', prop: 'oemName',
// bind: 'bsOemCustomer.ocName', // bind: 'bsOemCustomer.ocName',
sortable: true, sortable: true,
filter: true, filter: true,
@ -166,8 +166,12 @@ export default {
approval(row) { approval(row) {
this.isOpen = true this.isOpen = true
}, },
closeDialog() { closeDialog(val) {
this.isOpen = false this.isOpen = false
this.isShowImport = false
if(val){
this.onLoad()
}
}, },
handleDelete() { handleDelete() {
if (this.selectionList.length === 0) { if (this.selectionList.length === 0) {

@ -1,17 +1,19 @@
<template> <template>
<el-dialog title="增加" append-to-body :modelValue="openShow" width="90%" @close="closeDialog" fullscreen> <el-dialog title="申请" append-to-body :modelValue="openShow" width="90%" @close="closeDialog" fullscreen>
<el-form :model="form" label-width="auto" > <el-form ref="form" :model="submitForm" label-width="auto" :rules="rules" >
<el-form-item label="月份" required> <el-form-item label="月份" required prop="date">
<el-date-picker <el-date-picker
v-model="value5" v-model="submitForm.date"
format="YYYY-MM"
value-format="YYYY-MM"
type="month" type="month"
placeholder="请选择" placeholder="请选择"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="margin-bottom: 12px;"> <div style="margin-bottom: 12px;">
<el-button type="danger" @click="addEdit()">删除选择行</el-button> <el-button type="danger" @click="deleteTable">删除选择行</el-button>
<el-button type="primary" @click="addEdit()">保存</el-button> <!-- <el-button type="primary" @click="addEdit()">保存</el-button> -->
</div> </div>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" <avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@ -21,15 +23,17 @@
</template> </template>
</avue-crud> </avue-crud>
<!-- <template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </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>
</template> </template>
<script> <script>
import {getList} from "@/api/outsourcingManagement/baseTemplate"
import {performanceApply} from "@/api/outsourcingManagement/performanceApplication"
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -39,7 +43,14 @@ export default {
}, },
data() { data() {
return { return {
rules:{
date:[ { required: true, message: '请选择月份', trigger: 'blur' }]
},
openShow: false, openShow: false,
loading:false,
submitForm:{
date:'',
},
option: { option: {
height: 'auto', height: 'auto',
page:false, page:false,
@ -95,7 +106,7 @@ export default {
column: [ column: [
{ {
label: '工艺能力', label: '工艺能力',
prop: 'plate', prop: 'caName',
sortable: true, sortable: true,
filter: true, filter: true,
span: 24, span: 24,
@ -104,8 +115,8 @@ export default {
}, },
{ {
label: '厂家代码', label: '厂家代码',
prop: 'bsOemCustomer.ocCode', prop: 'oemCode',
bind: 'bsOemCustomer.ocCode', // bind: 'bsOemCustomer.ocCode',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -114,8 +125,8 @@ export default {
}, },
{ {
label: '厂家名称', label: '厂家名称',
prop: 'bsOemCustomer.ocName', prop: 'oemName',
bind: 'bsOemCustomer.ocName', // bind: 'bsOemCustomer.ocName',
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -144,9 +155,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -172,9 +183,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -200,9 +211,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -228,9 +239,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -257,9 +268,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -285,9 +296,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -313,9 +324,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -341,9 +352,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -369,9 +380,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -397,9 +408,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -425,9 +436,9 @@ export default {
span: 24, span: 24,
width: 120, width: 120,
cell: true, cell: true,
rules: [ // rules: [
{ required: true, message: '请输入姓名', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
] // ]
}, },
] ]
@ -453,120 +464,70 @@ export default {
}, },
] ]
}, },
data:[],
form: { form: {
}, },
page: { page: {
pageSize: 10, pageSize: 9999,
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
selectionList:[]
} }
}, },
mounted() { mounted() {
this.openShow = this.showDialog this.openShow = this.showDialog
}, },
methods: { methods: {
closeDialog() { closeDialog(val) {
this.openShow = false this.openShow = false
this.$emit('closeDialog'); this.$emit('closeDialog',val);
},
selectionChange(list){
this.selectionList = list
},
deleteTable(){
if(this.selectionList.length == 0){
this.$message.error('请选择要删除的行')
return
}
const idsToRemove = new Set(this.selectionList.map(i => i.id));
const resultNum = this.data.filter(i => !idsToRemove.has(i.id));
console.log('resultNum==========',resultNum)
this.data = resultNum
},
submit(){
console.log('111111111111')
this.$refs.form.validate(valid => {
if (valid) {
this.data.map(item =>{
item.ocId = parseInt(item.ocId)
})
let params = {
date:this.submitForm.date,
oemMeritsEntities:this.data
}
console.log('param---------',params)
// performanceApply(params).then(res =>{
// if(res.data.code == 200){
// this.$message.success('')
// this.closeDialog(true)
// }
// })
}
})
}, },
onLoad() { onLoad() {
this.loading = true this.loading = true
this.data = [ getList({
{ current: this.page.currentPage,
$cellEdit: true, size: this.page.pageSize,
"bsOemCustomer": { ...this.query,
"abbreviation": "L076", }).then((res) => {
"address": "aaa", // if(res.data.data.records.length > 0){
"codeAndName": "L076/L076", const obj = {
"contactMan": "aaa",
"contactPhone": "aaa",
"craftAbility": "镀银、挂镀银、喷砂、涂色标、铜合金化学镀镍、电镀镍、DL零件包装",
"curStatus": 0,
"curStatusText": "正常供货",
"email": "aaa",
"keyValue": 21,
"limitType": 0,
"ocCode": "L076",
"ocId": 21,
"ocName": "L076",
"oemPassword": null,
"partCodeYesOrNo": false,
"qualification": 10,
"qualificationTitle": null,
"region": "陕西省",
"updateTime": "2023-04-14 18:33:49"
},
"createMan": {
"userId": 541,
"userName": "崔殿龙"
},
"createTime": "2023-11-10 18:06:40",
"keyValue": 1,
"oaaId": 1,
"plate": "222",
jhzsTarget: 85,
zdljTarget: 92,
qqxTarget: 0,
produceTsTarget: 0,
djcwTarget: 0,
djcwReality: 0,
qualityTsTarget: 0,
qualityTsReality: 0,
qualityMerits: 0,
payMerits: 0,
qualityTsNum: 0,
djcwNum: 0,
dppmNum: 0,
hgxNum: 0,
produceTsNum: 0,
qqxNum: 0,
zdljNum: 0,
jhzsNum: 0,
ajorIssues: 0,
qqxReality: 0,
growAbility: 0,
produceTsReality: 0,
pcxTarget: 0,
pcxReality: 0,
dywTarget: 0,
dywReality: 0,
qlwtTarget: 0,
qlwtReality: 0
},
{
$cellEdit: true,
"bsOemCustomer": {
"abbreviation": "L120",
"address": "aaa",
"codeAndName": "L120/L120",
"contactMan": "aaa",
"contactPhone": "aaa",
"craftAbility": "不锈钢涂福斯润滑剂、DL零件包装、",
"curStatus": 0,
"curStatusText": "正常供货",
"email": "aaa",
"keyValue": 2,
"limitType": 0,
"ocCode": "L120",
"ocId": 2,
"ocName": "L120",
"oemPassword": null,
"partCodeYesOrNo": false,
"qualification": 0,
"qualificationTitle": "民品&普军",
"region": "江苏省",
"updateTime": "2023-04-14 18:33:49"
},
"createMan": {
"userId": 541,
"userName": "崔殿龙"
},
"createTime": "2023-11-10 18:06:40",
"keyValue": 4,
"oaaId": 4,
"plate": "222",
jhzsTarget: 85, jhzsTarget: 85,
zdljTarget: 92, zdljTarget: 92,
qqxTarget: 0, qqxTarget: 0,
@ -590,80 +551,213 @@ export default {
growAbility: 0, growAbility: 0,
produceTsReality: 0, produceTsReality: 0,
pcxTarget: 0, pcxTarget: 0,
pcxReality: 0, pcxReality:0,
dywTarget: 0, dywTarget: 0,
dywReality: 0, dywReality:0,
qlwtTarget: 0, qlwtTarget: 0,
qlwtReality: 0 qlwtReality:0,
}, $cellEdit:true
{ };
$cellEdit: true, // .map(item => {
"bsOemCustomer": { // ...item,...obj
"abbreviation": "L120", // })
"address": "aaa", this.data = res.data.data.records.map(item => ({ ...obj, ...item }));
"codeAndName": "L120/L120", // }
"contactMan": "aaa", // this.data = res.data.data.records
"contactPhone": "aaa", console.log('data===========',this.data)
"craftAbility": "不锈钢涂福斯润滑剂、DL零件包装、",
"curStatus": 0,
"curStatusText": "正常供货",
"email": "aaa",
"keyValue": 2,
"limitType": 0,
"ocCode": "L120",
"ocId": 2,
"ocName": "L120",
"oemPassword": null,
"partCodeYesOrNo": false,
"qualification": 0,
"qualificationTitle": "民品&普军",
"region": "江苏省",
"updateTime": "2023-04-14 18:33:49"
},
"createMan": {
"userId": 541,
"userName": "崔殿龙"
},
"createTime": "2023-12-07 09:53:47",
"keyValue": 41,
"oaaId": 41,
"plate": "222",
jhzsTarget: 85,
zdljTarget: 92,
qqxTarget: 0,
produceTsTarget: 0,
djcwTarget: 0,
djcwReality: 0,
qualityTsTarget: 0,
qualityTsReality: 0,
qualityMerits: 0,
payMerits: 0,
qualityTsNum: 0,
djcwNum: 0,
dppmNum: 0,
hgxNum: 0,
produceTsNum: 0,
qqxNum: 0,
zdljNum: 0,
jhzsNum: 0,
ajorIssues: 0,
qqxReality: 0,
growAbility: 0,
produceTsReality: 0,
pcxTarget: 0,
pcxReality: 0,
dywTarget: 0,
dywReality: 0,
qlwtTarget: 0,
qlwtReality: 0
},
]
this.page.total = this.data.length
this.loading = false this.loading = false
setTimeout(() => { })
this.selectionClear() // this.data = [
}, 500) // {
// $cellEdit: true,
// "bsOemCustomer": {
// "abbreviation": "L076",
// "address": "aaa",
// "codeAndName": "L076/L076",
// "contactMan": "aaa",
// "contactPhone": "aaa",
// "craftAbility": "DL",
// "curStatus": 0,
// "curStatusText": "",
// "email": "aaa",
// "keyValue": 21,
// "limitType": 0,
// "ocCode": "L076",
// "ocId": 21,
// "ocName": "L076",
// "oemPassword": null,
// "partCodeYesOrNo": false,
// "qualification": 10,
// "qualificationTitle": null,
// "region": "西",
// "updateTime": "2023-04-14 18:33:49"
// },
// "createMan": {
// "userId": 541,
// "userName": "殿"
// },
// "createTime": "2023-11-10 18:06:40",
// "keyValue": 1,
// "oaaId": 1,
// "plate": "222",
// jhzsTarget: 85,
// zdljTarget: 92,
// qqxTarget: 0,
// produceTsTarget: 0,
// djcwTarget: 0,
// djcwReality: 0,
// qualityTsTarget: 0,
// qualityTsReality: 0,
// qualityMerits: 0,
// payMerits: 0,
// qualityTsNum: 0,
// djcwNum: 0,
// dppmNum: 0,
// hgxNum: 0,
// produceTsNum: 0,
// qqxNum: 0,
// zdljNum: 0,
// jhzsNum: 0,
// ajorIssues: 0,
// qqxReality: 0,
// growAbility: 0,
// produceTsReality: 0,
// pcxTarget: 0,
// pcxReality: 0,
// dywTarget: 0,
// dywReality: 0,
// qlwtTarget: 0,
// qlwtReality: 0
// },
// {
// $cellEdit: true,
// "bsOemCustomer": {
// "abbreviation": "L120",
// "address": "aaa",
// "codeAndName": "L120/L120",
// "contactMan": "aaa",
// "contactPhone": "aaa",
// "craftAbility": "DL",
// "curStatus": 0,
// "curStatusText": "",
// "email": "aaa",
// "keyValue": 2,
// "limitType": 0,
// "ocCode": "L120",
// "ocId": 2,
// "ocName": "L120",
// "oemPassword": null,
// "partCodeYesOrNo": false,
// "qualification": 0,
// "qualificationTitle": "&",
// "region": "",
// "updateTime": "2023-04-14 18:33:49"
// },
// "createMan": {
// "userId": 541,
// "userName": "殿"
// },
// "createTime": "2023-11-10 18:06:40",
// "keyValue": 4,
// "oaaId": 4,
// "plate": "222",
// jhzsTarget: 85,
// zdljTarget: 92,
// qqxTarget: 0,
// produceTsTarget: 0,
// djcwTarget: 0,
// djcwReality: 0,
// qualityTsTarget: 0,
// qualityTsReality: 0,
// qualityMerits: 0,
// payMerits: 0,
// qualityTsNum: 0,
// djcwNum: 0,
// dppmNum: 0,
// hgxNum: 0,
// produceTsNum: 0,
// qqxNum: 0,
// zdljNum: 0,
// jhzsNum: 0,
// ajorIssues: 0,
// qqxReality: 0,
// growAbility: 0,
// produceTsReality: 0,
// pcxTarget: 0,
// pcxReality: 0,
// dywTarget: 0,
// dywReality: 0,
// qlwtTarget: 0,
// qlwtReality: 0
// },
// {
// $cellEdit: true,
// "bsOemCustomer": {
// "abbreviation": "L120",
// "address": "aaa",
// "codeAndName": "L120/L120",
// "contactMan": "aaa",
// "contactPhone": "aaa",
// "craftAbility": "DL",
// "curStatus": 0,
// "curStatusText": "",
// "email": "aaa",
// "keyValue": 2,
// "limitType": 0,
// "ocCode": "L120",
// "ocId": 2,
// "ocName": "L120",
// "oemPassword": null,
// "partCodeYesOrNo": false,
// "qualification": 0,
// "qualificationTitle": "&",
// "region": "",
// "updateTime": "2023-04-14 18:33:49"
// },
// "createMan": {
// "userId": 541,
// "userName": "殿"
// },
// "createTime": "2023-12-07 09:53:47",
// "keyValue": 41,
// "oaaId": 41,
// "plate": "222",
// jhzsTarget: 85,
// zdljTarget: 92,
// qqxTarget: 0,
// produceTsTarget: 0,
// djcwTarget: 0,
// djcwReality: 0,
// qualityTsTarget: 0,
// qualityTsReality: 0,
// qualityMerits: 0,
// payMerits: 0,
// qualityTsNum: 0,
// djcwNum: 0,
// dppmNum: 0,
// hgxNum: 0,
// produceTsNum: 0,
// qqxNum: 0,
// zdljNum: 0,
// jhzsNum: 0,
// ajorIssues: 0,
// qqxReality: 0,
// growAbility: 0,
// produceTsReality: 0,
// pcxTarget: 0,
// pcxReality: 0,
// dywTarget: 0,
// dywReality: 0,
// qlwtTarget: 0,
// qlwtReality: 0
// },
// ]
// this.page.total = this.data.length
// this.loading = false
// setTimeout(() => {
// this.selectionClear()
// }, 500)
} }
} }
} }

@ -22,7 +22,7 @@
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="scope"> <template #menu="scope">
<!-- <el-button type="text" @click="editClick(scope.row.omId)">更新月份</el-button> --> <!-- <el-button type="text" @click="editClick(scope.row.omId)">更新月份</el-button> -->
<el-button type="text" @click="deleteClick(scope.row.omId)">删除</el-button> <el-button type="text" v-if="scope.row.omStatus < 3" @click="deleteClick(scope.row)">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<addQuality <addQuality
@ -34,6 +34,7 @@
</template> </template>
<script> <script>
import addQuality from "./components/addQuality.vue"; import addQuality from "./components/addQuality.vue";
import {getList,performanceApplyDel} from "@/api/outsourcingManagement/performanceApplication"
export default { export default {
components: { components: {
addQuality, addQuality,
@ -41,6 +42,8 @@ export default {
data() { data() {
return { return {
selectionList: [], selectionList: [],
loading:false,
query:{},
option: { option: {
height: "auto", height: "auto",
calcHeight: 32, calcHeight: 32,
@ -66,7 +69,7 @@ export default {
editBtnIcon: " ", editBtnIcon: " ",
viewBtnText: "详情", viewBtnText: "详情",
labelWidth: 120, labelWidth: 120,
menuWidth: 180, menuWidth: 80,
dialogWidth: 640, dialogWidth: 640,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -92,27 +95,43 @@ export default {
column: [ column: [
{ {
label: "工艺能力", label: "工艺能力",
prop: "plate", prop: "caId",
sortable: true, sortable: true,
filter: true, filter: true,
hide:true,
span: 24, span: 24,
search: true, search: true,
width: 130, width: 130,
searchLabelWidth: 80, searchLabelWidth: 80,
type: "select", type: "select",
dicData: [ dicUrl:"/api/blade-desk/BA/craftAbility/findList",
{ props:{
label: "镀金", label: "caName",
value:'id'
}, },
{
label: "镀银",
}, },
], {
label: "工艺能力",
prop: "caName",
sortable: true,
filter: true,
span: 24,
search: false,
width: 130,
searchLabelWidth: 80,
// dicData: [
// {
// label: "",
// },
// {
// label: "",
// },
// ],
}, },
{ {
label: "厂家代码", label: "厂家代码",
prop: "bsOemCustomer.ocCode", prop: "oemCode",
bind: "bsOemCustomer.ocCode", // bind: "bsOemCustomer.ocCode",
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -121,8 +140,8 @@ export default {
}, },
{ {
label: "厂家名称", label: "厂家名称",
prop: "bsOemCustomer.ocName", prop: "oemName",
bind: "bsOemCustomer.ocName", // bind: "bsOemCustomer.ocName",
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
@ -131,7 +150,7 @@ export default {
}, },
{ {
label: "月份", label: "月份",
prop: "updateTime", prop: "monthStr",
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -139,31 +158,56 @@ export default {
width: 90, width: 90,
}, },
{ {
label: "状态", label:"状态",
prop: "omStatus", prop:"statusList",
type: "select", hide:true,
search: true, search:true,
sortable: true, type:'select',
span: 24, dicData:[
searchLabelWidth: 60,
dicData: [
{ {
value: 1, value:1,
label: "新建", label:"新建"
}, },
{ {
value: 2, value:2,
label: "填写中", label:"填写中"
}, },
{ {
value: 3, value:3,
label: "已评审", label:"已评审"
}, },
{ {
value: 4, value:4,
label: "已审核", label:"已审核"
}, },
], ]
},
{
label: "状态",
prop: "omStatusTitle",
// type: "select",
search: false,
sortable: true,
span: 24,
searchLabelWidth: 60,
// dicData: [
// {
// value: 1,
// label: "",
// },
// {
// value: 2,
// label: "",
// },
// {
// value: 3,
// label: "",
// },
// {
// value: 4,
// label: "",
// },
// ],
}, },
{ {
label: "计划准时完成", label: "计划准时完成",
@ -605,26 +649,27 @@ export default {
addEdit() { addEdit() {
this.isOpen = true; this.isOpen = true;
}, },
closeDialog() { closeDialog(val) {
this.isOpen = false; this.isOpen = false;
if(val){
this.onLoad()
}
}, },
deleteClick(omId) { deleteClick(row) {
this.$confirm("是否删除此数据?", "提示", { this.$confirm("是否删除此数据?", "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => {
performanceApplyDel({
ids:row.id
}).then(res =>{
if(res.data.code == 200){
this.$message.success('删除成功')
this.onLoad()
}
}) })
.then(() => {
// this.$ajax.get('oemMerits/deleteByKey/' + omId).then((res) => {
// if (this.$ifAjax(res)) {
// this.$message.success(this.$t('global.deleteOk'));
// this.$refs.myTable.load();
// }
// });
}) })
.catch(() => {
this.$message.info("已取消");
});
}, },
async editClick(omId) { async editClick(omId) {
this.omId = omId; this.omId = omId;
@ -646,116 +691,142 @@ export default {
type: "warning", type: "warning",
}).then(() => {}); }).then(() => {});
}, },
searchChange(params, done){
this.query = params;
this.page.currentPage = 1
this.onLoad()
done()
},
searchReset(){
this.query = {}
this.onLoad()
},
currentChange(currentPage){
this.page.currentPage = currentPage
},
sizeChange(pageSize){
this.page.pageSize = pageSize
},
// //
selectionChange(list) { selectionChange(list) {
this.selectionList = list; this.selectionList = list;
}, },
onLoad() { onLoad() {
this.loading = true; this.loading = true;
this.data = [ getList({
{ // statusList:'1',
bsOemCustomer: { current: this.page.currentPage,
abbreviation: "L076", size: this.page.pageSize,
address: "aaa", ...this.query,
codeAndName: "L076/L076", }).then((res) => {
contactMan: "aaa", this.data = res.data.data.records;
contactPhone: "aaa", this.page.total = res.data.data.total;
craftAbility:
"镀银、挂镀银、喷砂、涂色标、铜合金化学镀镍、电镀镍、DL零件包装",
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 21,
limitType: 0,
ocCode: "L076",
ocId: 21,
ocName: "L076",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 10,
qualificationTitle: null,
region: "陕西省",
updateTime: "2023-04-14 18:33:49",
},
createMan: {
userId: 541,
userName: "崔殿龙",
},
createTime: "2023-11-10 18:06:40",
keyValue: 1,
oaaId: 1,
plate: "222",
},
{
bsOemCustomer: {
abbreviation: "L120",
address: "aaa",
codeAndName: "L120/L120",
contactMan: "aaa",
contactPhone: "aaa",
craftAbility: "不锈钢涂福斯润滑剂、DL零件包装、",
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 2,
limitType: 0,
ocCode: "L120",
ocId: 2,
ocName: "L120",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 0,
qualificationTitle: "民品&普军",
region: "江苏省",
updateTime: "2023-04-14 18:33:49",
},
createMan: {
userId: 541,
userName: "崔殿龙",
},
createTime: "2023-11-10 18:06:40",
keyValue: 4,
oaaId: 4,
plate: "222",
},
{
bsOemCustomer: {
abbreviation: "L070",
address: "aaa",
codeAndName: "L070/L070",
contactMan: "aaa",
contactPhone: "aaa",
craftAbility: "滚镀金或振镀金、局部镀厚金、闪镀金、镀铂金、局部退火",
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 5,
limitType: 0,
ocCode: "L070",
ocId: 5,
ocName: "L070",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 10,
qualificationTitle: null,
region: "江苏省",
updateTime: "2023-04-14 18:33:49",
},
createMan: {
userId: 541,
userName: "崔殿龙",
},
createTime: "2023-12-06 17:24:48",
keyValue: 21,
oaaId: 21,
plate: "222",
},
];
this.page.total = this.data.length;
this.loading = false; this.loading = false;
setTimeout(() => { })
this.selectionClear(); // this.data = [
}, 500); // {
// bsOemCustomer: {
// abbreviation: "L076",
// address: "aaa",
// codeAndName: "L076/L076",
// contactMan: "aaa",
// contactPhone: "aaa",
// craftAbility:
// "DL",
// curStatus: 0,
// curStatusText: "",
// email: "aaa",
// keyValue: 21,
// limitType: 0,
// ocCode: "L076",
// ocId: 21,
// ocName: "L076",
// oemPassword: null,
// partCodeYesOrNo: false,
// qualification: 10,
// qualificationTitle: null,
// region: "西",
// updateTime: "2023-04-14 18:33:49",
// },
// createMan: {
// userId: 541,
// userName: "殿",
// },
// createTime: "2023-11-10 18:06:40",
// keyValue: 1,
// oaaId: 1,
// plate: "222",
// },
// {
// bsOemCustomer: {
// abbreviation: "L120",
// address: "aaa",
// codeAndName: "L120/L120",
// contactMan: "aaa",
// contactPhone: "aaa",
// craftAbility: "DL",
// curStatus: 0,
// curStatusText: "",
// email: "aaa",
// keyValue: 2,
// limitType: 0,
// ocCode: "L120",
// ocId: 2,
// ocName: "L120",
// oemPassword: null,
// partCodeYesOrNo: false,
// qualification: 0,
// qualificationTitle: "&",
// region: "",
// updateTime: "2023-04-14 18:33:49",
// },
// createMan: {
// userId: 541,
// userName: "殿",
// },
// createTime: "2023-11-10 18:06:40",
// keyValue: 4,
// oaaId: 4,
// plate: "222",
// },
// {
// bsOemCustomer: {
// abbreviation: "L070",
// address: "aaa",
// codeAndName: "L070/L070",
// contactMan: "aaa",
// contactPhone: "aaa",
// craftAbility: "退",
// curStatus: 0,
// curStatusText: "",
// email: "aaa",
// keyValue: 5,
// limitType: 0,
// ocCode: "L070",
// ocId: 5,
// ocName: "L070",
// oemPassword: null,
// partCodeYesOrNo: false,
// qualification: 10,
// qualificationTitle: null,
// region: "",
// updateTime: "2023-04-14 18:33:49",
// },
// createMan: {
// userId: 541,
// userName: "殿",
// },
// createTime: "2023-12-06 17:24:48",
// keyValue: 21,
// oaaId: 21,
// plate: "222",
// },
// ];
// this.page.total = this.data.length;
// this.loading = false;
// setTimeout(() => {
// this.selectionClear();
// }, 500);
}, },
}, },
}; };

Loading…
Cancel
Save