Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
6ce9546c41
|
|
@ -1,11 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
|
|
||||||
<div style="margin-top: 2px">
|
<div style="margin-top: 2px">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
>新增</el-button
|
>新增
|
||||||
>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
|
|
@ -44,13 +43,15 @@
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['customfield_update'])"
|
v-if="checkPermission(['customfield_update'])"
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑
|
||||||
|
</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['customfield_delete'])"
|
v-if="checkPermission(['customfield_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDeleteCustomfield(scope)"
|
@click="handleDeleteCustomfield(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
|
</el-link
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -78,7 +79,7 @@
|
||||||
<el-form-item label="占位符" prop="placeholder">
|
<el-form-item label="占位符" prop="placeholder">
|
||||||
<el-input v-model="customfield.placeholder" placeholder="占位符"/>
|
<el-input v-model="customfield.placeholder" placeholder="占位符"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段类型" prop="field_type">
|
<el-form-item label="展示标签" prop="field_type">
|
||||||
<el-select style="width: 100%" v-model="customfield.field_type" placeholder="请选择">
|
<el-select style="width: 100%" v-model="customfield.field_type" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
|
|
@ -88,29 +89,54 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="字段标签" v-show="customfield.field_type=='select'||customfield.field_type=='selects'">
|
||||||
|
<el-input v-model="customfield.label" placeholder="选项类型"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="选项" v-show="customfield.field_type=='select'||customfield.field_type=='selects'">
|
<el-form-item label="选项" v-show="customfield.field_type=='select'||customfield.field_type=='selects'">
|
||||||
<el-button @click.prevent="addDomain" style="border: none;">
|
<el-button @click.prevent="addDomain" style="border: none;">
|
||||||
<i class="el-icon-circle-plus-outline"></i>
|
<i class="el-icon-circle-plus-outline"></i>
|
||||||
<span style="font-size:14px;">添加</span>
|
<span style="font-size:14px;">添加</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-row v-for="(domain, $index) in choiceOption" :key=domain+$index style="margin-bottom: 10px">
|
<el-row v-for="(domain, $index) in choiceOption" :key='$index+1' style="margin-bottom: 10px">
|
||||||
<el-col :span="20">
|
<el-col :span="10">
|
||||||
<el-input v-model="choiceOption[$index]" auto-complete="off"></el-input>
|
<template>
|
||||||
|
<el-form-item label="id:">
|
||||||
|
<el-input type="number" v-model="choiceOption[$index].id" auto-complete="off" placeholder="id为整数"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<template>
|
||||||
|
<el-form-item label="name:">
|
||||||
|
<el-input v-model="choiceOption[$index].name" auto-complete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" style="text-align: center" v-if="$index!==0">
|
<el-col :span="3" style="text-align: center" v-if="$index!==0">
|
||||||
<i class="el-icon-remove-outline" @click.prevent="removeDomain($index,'1')" style="color: red;font-size: 16px;"></i>
|
<i
|
||||||
|
class="el-icon-remove-outline"
|
||||||
|
style="color: red;font-size: 16px;"
|
||||||
|
@click.prevent="removeDomain($index,'1')"
|
||||||
|
></i>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="顺序ID" prop="sort">
|
<el-form-item label="顺序ID">
|
||||||
<el-input v-model="customfield.sort" type="number" placeholder="顺序"/>
|
<el-input v-model="customfield.sort" type="number" placeholder="顺序"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="默认值" prop="default_value">
|
<el-form-item label="默认值">
|
||||||
<el-input v-model="customfield.default_value" placeholder="默认值"/>
|
<el-input v-model="customfield.default_value" placeholder="默认值"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="模板" prop="field_template">
|
<el-form-item label="模板">
|
||||||
<el-input v-model="customfield.field_template" placeholder="你有一个待办工单:{title}"/>
|
<el-input v-model="customfield.field_template" placeholder="你有一个待办工单:{title}"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="是否隐藏">
|
||||||
|
<el-radio-group v-model="customfield.is_hidden">
|
||||||
|
<el-radio :label="false">显示</el-radio>
|
||||||
|
<el-radio :label="true">隐藏</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
|
@ -140,10 +166,14 @@ export default {
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
field_type: '',
|
field_type: '',
|
||||||
sort: '',
|
sort: '',
|
||||||
|
label: 'name',
|
||||||
default_value: '',
|
default_value: '',
|
||||||
field_template: '',
|
field_template: '',
|
||||||
field_choice:[]
|
field_choice: [],
|
||||||
|
is_hidden:false,
|
||||||
},
|
},
|
||||||
|
fieldHidden: true,
|
||||||
|
fieldBlock: false,
|
||||||
view_permission_check: false,
|
view_permission_check: false,
|
||||||
hasJsonFlag: true, // json是否验证通过
|
hasJsonFlag: true, // json是否验证通过
|
||||||
hasJsonFlag1: true, // json是否验证通过
|
hasJsonFlag1: true, // json是否验证通过
|
||||||
|
|
@ -151,7 +181,17 @@ export default {
|
||||||
// customfieldList: {
|
// customfieldList: {
|
||||||
// count:0
|
// count:0
|
||||||
// },
|
// },
|
||||||
customfieldList:[],
|
customfieldList: [''],
|
||||||
|
labels:[{
|
||||||
|
label: '常规',
|
||||||
|
value: 'name'
|
||||||
|
},{
|
||||||
|
label: '名称|id',
|
||||||
|
value: 'name|id'
|
||||||
|
},{
|
||||||
|
label: '人员选择',
|
||||||
|
value: 'user'
|
||||||
|
}],
|
||||||
options: [{
|
options: [{
|
||||||
value: 'string',
|
value: 'string',
|
||||||
label: '文本'
|
label: '文本'
|
||||||
|
|
@ -177,19 +217,20 @@ export default {
|
||||||
value: 'textarea',
|
value: 'textarea',
|
||||||
label: '文本域'
|
label: '文本域'
|
||||||
},{
|
},{
|
||||||
|
value: 'file',
|
||||||
|
label: '附件'
|
||||||
|
}],
|
||||||
|
/*, {
|
||||||
value: 'selectuser',
|
value: 'selectuser',
|
||||||
label: '用户名'
|
label: '用户名'
|
||||||
}, {
|
}, {
|
||||||
value: 'selectusers',
|
value: 'selectusers',
|
||||||
label: '多选的用户名'
|
label: '多选的用户名'
|
||||||
}, {
|
}, */
|
||||||
value: 'file',
|
|
||||||
label: '附件'
|
|
||||||
}],
|
|
||||||
|
|
||||||
|
|
||||||
boolean_field_display: [],
|
boolean_field_display: [],
|
||||||
choiceOption:[''],
|
choiceOption: [{id:null,name:""}],
|
||||||
field_choice: [],
|
field_choice: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
|
|
@ -207,7 +248,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
//添加字段选项
|
//添加字段选项
|
||||||
addDomain() {
|
addDomain() {
|
||||||
this.choiceOption.push('')
|
this.choiceOption.push({id:null,name:""})
|
||||||
},
|
},
|
||||||
//删除字段选项
|
//删除字段选项
|
||||||
removeDomain(index) {
|
removeDomain(index) {
|
||||||
|
|
@ -216,7 +257,6 @@ export default {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
getList() {
|
getList() {
|
||||||
|
|
||||||
getWfCustomfieldList(this.ID).then((response) => {
|
getWfCustomfieldList(this.ID).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.customfieldList = response.data;
|
this.customfieldList = response.data;
|
||||||
|
|
@ -224,8 +264,6 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -241,22 +279,23 @@ export default {
|
||||||
this.customfield = Object.assign({}, defaultcustomfield);
|
this.customfield = Object.assign({}, defaultcustomfield);
|
||||||
this.dialogType = "new";
|
this.dialogType = "new";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
/*this.$nextTick(() => {
|
||||||
this.$refs["Form"].clearValidate();
|
// this.$refs["Form"].clearValidate();
|
||||||
});
|
this.customfield.label = 1;
|
||||||
|
});*/
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
|
debugger;
|
||||||
this.customfield = Object.assign({}, scope.row); // copy obj
|
this.customfield = Object.assign({}, scope.row); // copy obj
|
||||||
this.choiceOption = scope.row.field_choice;
|
this.choiceOption = scope.row.field_choice;
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
/*this.$nextTick(() => {
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
});
|
});*/
|
||||||
},
|
},
|
||||||
handlecfgt(scope)
|
handlecfgt(scope) {
|
||||||
{
|
|
||||||
this.$router.push({name: "configuration", params: {customfield: scope.row.id}})
|
this.$router.push({name: "configuration", params: {customfield: scope.row.id}})
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
@ -267,7 +306,7 @@ export default {
|
||||||
type: "error",
|
type: "error",
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await deleteWorkflow(scope.row.id);
|
await this.deleteWorkflow(scope.row.id);
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
|
|
@ -277,14 +316,23 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
|
let that = this,choiceArr = [];
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = this.dialogType === "edit";
|
const isEdit = that.dialogType === "edit";
|
||||||
|
if(that.choiceOption[0]&&that.choiceOption[0].name!==''&&that.choiceOption[0].name!==null&&that.choiceOption[0].name!==undefined){
|
||||||
|
that.choiceOption.forEach((item)=>{
|
||||||
|
let obj = new Object();
|
||||||
|
obj.id = parseInt(item.id);
|
||||||
|
obj.name = item.name;
|
||||||
|
choiceArr.push(obj);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
debugger;
|
||||||
|
console.log(choiceArr);
|
||||||
|
that.customfield.field_choice = choiceArr;
|
||||||
|
console.log(that.customfield);
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
this.checkJson();
|
|
||||||
this.checkJson1();
|
|
||||||
this.checkJson2();
|
|
||||||
this.customfield.field_choice = this.choiceOption;
|
|
||||||
updateWfCustomfield(this.customfield.id, this.customfield).then((res) => {
|
updateWfCustomfield(this.customfield.id, this.customfield).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -293,11 +341,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.checkJson();
|
|
||||||
this.checkJson1();
|
|
||||||
this.checkJson2();
|
|
||||||
this.customfield.workflow = this.ID;
|
this.customfield.workflow = this.ID;
|
||||||
this.customfield.field_choice = this.choiceOption;
|
|
||||||
createWfCustomfield(this.customfield).then((res) => {
|
createWfCustomfield(this.customfield).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -327,7 +371,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onJsonChange (value) {
|
/* onJsonChange(value) {
|
||||||
// console.log('更改value:', value);
|
// console.log('更改value:', value);
|
||||||
// 实时保存
|
// 实时保存
|
||||||
this.onJsonSave(value)
|
this.onJsonSave(value)
|
||||||
|
|
@ -345,10 +389,10 @@ export default {
|
||||||
// 检查json
|
// 检查json
|
||||||
checkJson() {
|
checkJson() {
|
||||||
if (this.hasJsonFlag == false) {
|
if (this.hasJsonFlag == false) {
|
||||||
alert("布尔显示定义json验证失败")
|
// alert("布尔显示定义json验证失败")
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
alert("布尔显示定义json验证成功")
|
// alert("布尔显示定义json验证成功")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -367,10 +411,10 @@ export default {
|
||||||
// 检查json
|
// 检查json
|
||||||
checkJson1() {
|
checkJson1() {
|
||||||
if (this.hasJsonFlag1 == false) {
|
if (this.hasJsonFlag1 == false) {
|
||||||
alert("选项json验证失败")
|
// alert("选项json验证失败")
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
alert("选项json1验证成功")
|
// alert("选项json1验证成功")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -389,13 +433,13 @@ export default {
|
||||||
// 检查json
|
// 检查json
|
||||||
checkJson2() {
|
checkJson2() {
|
||||||
if (this.hasJsonFlag2 == false) {
|
if (this.hasJsonFlag2 == false) {
|
||||||
alert("标签json验证失败")
|
// alert("标签json验证失败")
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
alert("标签json1验证成功")
|
// alert("标签json1验证成功")
|
||||||
return true
|
return true
|
||||||
}
|
}*/
|
||||||
},
|
// },
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,7 @@
|
||||||
<el-option label="只读" value="1"></el-option>
|
<el-option label="只读" value="1"></el-option>
|
||||||
<el-option label="必填" value="2"></el-option>
|
<el-option label="必填" value="2"></el-option>
|
||||||
<el-option label="可选" value="3"></el-option>
|
<el-option label="可选" value="3"></el-option>
|
||||||
|
<el-option label="隐藏" value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" style="text-align: center" v-if="$index!==0">
|
<el-col :span="2" style="text-align: center" v-if="$index!==0">
|
||||||
|
|
|
||||||
|
|
@ -308,9 +308,9 @@
|
||||||
<el-select style="width: 100%" v-model="item.default_value" placeholder="请选择">
|
<el-select style="width: 100%" v-model="item.default_value" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item1 in item.field_choice"
|
v-for="item1 in item.field_choice"
|
||||||
:key="item1"
|
:key="item1.id"
|
||||||
:label="item1"
|
:label="item1.name"
|
||||||
:value="item1"
|
:value="item1.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -319,9 +319,9 @@
|
||||||
<el-select style="width: 100%" multiple v-model="item.default_value" placeholder="请选择">
|
<el-select style="width: 100%" multiple v-model="item.default_value" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item1 in item.field_choice"
|
v-for="item1 in item.field_choice"
|
||||||
:key="item1"
|
:key="item1.id"
|
||||||
:label="item1"
|
:label="item1.name"
|
||||||
:value="item1"
|
:value="item1.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
|
||||||
|
|
@ -508,98 +508,78 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--不合格半成品重审-->
|
<!--不合格半成品重审-->
|
||||||
<el-dialog title="不合格半成品重审" :close-on-click-modal="false" :visible.sync="limitedRetrial">
|
<el-dialog title="不合格半成品重审" :close-on-click-modal="false" :visible.sync="limitedRetrial">
|
||||||
<el-form label-width="80px" label-position="right">
|
<el-form label-width="130px" label-position="right">
|
||||||
<el-row v-for="(item, $index) in fieldList.record_data" :key="$index">
|
<el-form-item :label="item.field_name" v-for="item in customfieldList" :key="item.id" v-show="!item.is_hidden">
|
||||||
<el-form-item
|
<template v-if="item.field_type=='string'">
|
||||||
v-if="item.field_type === 'string'"
|
<el-input v-model="item.default_value" :placeholder="item.description" />
|
||||||
:label="item.field_name"
|
</template>
|
||||||
>
|
<template v-if="item.field_type==='int'">
|
||||||
<el-input placeholder="请输入" v-model="item.sort" />
|
<el-input v-model="item.default_value" type="number" :placeholder="item.description" oninput="value=value.replace(/[^\d]/g,'')" />
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item
|
<template v-if="item.field_type==='float'">
|
||||||
v-else-if="item.field_type === 'int'"
|
<el-input v-model="item.default_value" type="number" :placeholder="item.description" />
|
||||||
:label="item.field_name"
|
</template>
|
||||||
>
|
<template v-if="item.field_type==='date'">
|
||||||
<el-input
|
|
||||||
type="number"
|
|
||||||
placeholder="请输入"
|
|
||||||
v-model="item.sort"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-else-if="item.field_type === 'float'"
|
|
||||||
:label="item.field_name"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
type="number"
|
|
||||||
placeholder="请输入"
|
|
||||||
v-model="item.sort"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-else-if="item.field_type === 'date'"
|
|
||||||
:label="item.field_name"
|
|
||||||
>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.create_time"
|
v-model="item.default_value"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item
|
<template v-if="item.field_type==='datetime'">
|
||||||
v-else-if="item.field_type === 'datetime'"
|
|
||||||
:label="item.field_name"
|
|
||||||
>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.create_time"
|
v-model="item.default_value"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item
|
<template v-if="item.field_type==='select'">
|
||||||
v-else-if="item.field_type === 'select'"
|
<el-select style="width: 100%" v-model="item.default_value" placeholder="请选择">
|
||||||
:label="item.field_name"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="item.sort"
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item1 in item.field_choice"
|
v-for="item1 in item.field_choice"
|
||||||
:key="item1"
|
:key="item1.id"
|
||||||
:label="item1"
|
:label="item1.name"
|
||||||
:value="item1"
|
:value="item1.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item
|
<template v-if="item.field_type==='selects'">
|
||||||
v-else-if="item.field_type === 'selects'"
|
<el-select style="width: 100%" multiple v-model="item.default_value" placeholder="请选择">
|
||||||
:label="item.field_name"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="optio"
|
|
||||||
multiple
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item1 in item.field_choice"
|
v-for="item1 in item.field_choice"
|
||||||
:key="item1"
|
:key="item1.id"
|
||||||
:label="item1"
|
:label="item1.name"
|
||||||
:value="item1"
|
:value="item1.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type==='textarea'">
|
||||||
|
<el-input type="textarea" :rows="3" v-model="item.default_value" placeholder="内容" />
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type==='file'">
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:action="upUrl"
|
||||||
|
:on-preview="handlePreview"
|
||||||
|
:on-success="handleUpSuccess"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:headers="upHeaders"
|
||||||
|
:file-list="fileList"
|
||||||
|
:limit="1"
|
||||||
|
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
||||||
|
>
|
||||||
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="limitedRetrial = false">取 消</el-button>
|
<el-button @click="limitedRetrial = false">取 消</el-button>
|
||||||
|
|
@ -609,12 +589,15 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getOrgAll } from "@/api/org";
|
||||||
|
import { getUserList } from "@/api/user";
|
||||||
|
import {getWarehouseList} from "@/api/inm";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
import customForm from '@/components/customForm/index';
|
import customForm from '@/components/customForm/index';
|
||||||
import reviewForm from '@/components/customForm/review';
|
import reviewForm from '@/components/customForm/review';
|
||||||
import {getwproductList, wproductTest, wproductPutin, createputins,testInit,scrap,getRetrial} from "@/api/wpm";
|
import {getWfCustomfieldList,createTicket} from "@/api/workflow";
|
||||||
import checkPermission from "@/utils/permission";
|
|
||||||
import {getWarehouseList} from "@/api/inm";
|
|
||||||
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
|
import {getwproductList, wproductTest, wproductPutin, createputins,testInit,scrap,getRetrial} from "@/api/wpm";
|
||||||
import {getTestRecord,getTestRecordItem,putTestRecordItem,delTestRecordItem,subTestRecordItem} from "@/api/qm";
|
import {getTestRecord,getTestRecordItem,putTestRecordItem,delTestRecordItem,subTestRecordItem} from "@/api/qm";
|
||||||
import {genTree} from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
@ -704,7 +687,10 @@
|
||||||
originList: [],
|
originList: [],
|
||||||
is_testok: "true",
|
is_testok: "true",
|
||||||
field: [],
|
field: [],
|
||||||
|
userList: [],//用户列表
|
||||||
|
orgList: [],//部门列表
|
||||||
recordformList: [],
|
recordformList: [],
|
||||||
|
customfieldList: [],
|
||||||
recordform: null,
|
recordform: null,
|
||||||
recordId: null,
|
recordId: null,
|
||||||
fifo_detail: "",
|
fifo_detail: "",
|
||||||
|
|
@ -728,6 +714,15 @@
|
||||||
dialogFormVisibles: false,
|
dialogFormVisibles: false,
|
||||||
limitedCheckRecord: false,
|
limitedCheckRecord: false,
|
||||||
testrecord: {},
|
testrecord: {},
|
||||||
|
retrialItem: {},//复检对象
|
||||||
|
retrialResponse: {},//复检对象
|
||||||
|
//复检表单
|
||||||
|
retrialForm: {
|
||||||
|
title:'',
|
||||||
|
transition:'',
|
||||||
|
workflow:'',
|
||||||
|
ticket_data:{},
|
||||||
|
},
|
||||||
WarehouseData: "",
|
WarehouseData: "",
|
||||||
formName: '项目检查表',
|
formName: '项目检查表',
|
||||||
};
|
};
|
||||||
|
|
@ -823,14 +818,64 @@
|
||||||
},
|
},
|
||||||
//不合格产品重审展示
|
//不合格产品重审展示
|
||||||
handleRetrial(scope){
|
handleRetrial(scope){
|
||||||
|
let that =this;
|
||||||
|
this.retrialItem = Object.assign({}, scope.row);
|
||||||
|
console.log(this.retrialItem);
|
||||||
getRetrial(scope.row.id).then(res=>{
|
getRetrial(scope.row.id).then(res=>{
|
||||||
debugger;
|
that.retrialResponse = res.data;
|
||||||
console.log(res)
|
getWfCustomfieldList(res.data.workflow).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
that.customfieldList = response.data;
|
||||||
|
for (let i=0;i<that.customfieldList.length;i++) {
|
||||||
|
if(that.customfieldList[i].field_key==="wproduct"){
|
||||||
|
that.customfieldList[i].default_value = that.retrialResponse.exist_data.wproduct;
|
||||||
|
}
|
||||||
|
if(that.customfieldList[i].field_key==="wproduct_name"){
|
||||||
|
that.customfieldList[i].default_value = that.retrialResponse.exist_data.wproduct_name;
|
||||||
|
}
|
||||||
|
if(that.customfieldList[i].field_key==="wproduct_type"){
|
||||||
|
that.customfieldList[i].default_value = that.retrialResponse.exist_data.wproduct_specification;
|
||||||
|
}
|
||||||
|
if(that.customfieldList[i].field_key==="finder"){
|
||||||
|
that.customfieldList[i].default_value = that.retrialResponse.exist_data.finder;
|
||||||
|
}
|
||||||
|
if(that.customfieldList[i].field_key==="find_process"){
|
||||||
|
that.customfieldList[i].default_value = that.retrialResponse.exist_data.find_process;
|
||||||
|
}
|
||||||
|
if(that.customfieldList[i].label==="sys_user"){
|
||||||
|
that.customfieldList[i].field_choice = that.userList;
|
||||||
|
}
|
||||||
|
if(that.customfieldList[i].label==="deptSelect"){
|
||||||
|
that.customfieldList[i].field_choice = that.orgList;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
that.limitedRetrial = true;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//不合格产品重审提交
|
//不合格产品重审提交
|
||||||
retrialSubmit(){
|
retrialSubmit(){
|
||||||
|
let that = this;
|
||||||
|
let fields = this.customfieldList;
|
||||||
|
let obj = new Object();
|
||||||
|
for(let i=0;i<fields.length;i++){
|
||||||
|
obj[fields[i].field_key] = fields[i].default_value
|
||||||
|
}
|
||||||
|
this.retrialForm.ticket_data = obj;
|
||||||
|
this.retrialForm.workflow = that.retrialResponse.workflow;
|
||||||
|
this.retrialForm.transition = 20;
|
||||||
|
this.retrialForm.title = that.retrialResponse.exist_data.wproduct_name+'的重审';
|
||||||
|
debugger;
|
||||||
|
console.log(this.retrialForm);
|
||||||
|
createTicket(this.retrialForm).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
// this.getList();
|
||||||
|
this.limitedRetrial = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//夹层半成品列表
|
//夹层半成品列表
|
||||||
getList3() {
|
getList3() {
|
||||||
|
|
@ -1202,5 +1247,15 @@
|
||||||
this.reload()
|
this.reload()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
getUserList({page:0}).then(response => {
|
||||||
|
if (response.data) {
|
||||||
|
this.userList = response.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getOrgAll().then((response) => {
|
||||||
|
this.orgList = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue