作者 王勋

修改

... ... @@ -83,18 +83,20 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="最大值">
<el-input :min="0" type="number" @blur="checkBlur" @input="checkValue" v-model="formData.maxValue"></el-input>
</el-form-item>
<el-form-item label="最小值">
<el-input :min="0" type="number" v-model="formData.minValue"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="最小值">
<el-input :min="0" type="number" v-model="formData.minValue"></el-input>
<el-form-item label="最大值">
<el-input :min="0" type="number" @blur="checkBlur" @input="checkValue" v-model="formData.maxValue"></el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单位">
<el-input class="el__inot" v-model="formData.units"></el-input>
... ...
... ... @@ -22,13 +22,13 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="8">
<el-form-item label="导入成功数量">
<el-input disabled v-model="result.successTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="8">
<el-form-item label="导入失败数量">
<el-input disabled v-model="result.loseTime"></el-input>
</el-form-item>
... ...
... ... @@ -18,7 +18,7 @@
>
<el-form label-width="140px">
<el-row>
<el-col :span="6">
<el-col :span="8">
<el-form-item
label="镶件编码"
:rules="[{ required: true, message: '不能为空' }]"
... ... @@ -26,7 +26,7 @@
<el-input :disabled="editstatus" v-model="moldNum"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
label="镶件名称"
:rules="[{ required: true, message: '不能为空' }]"
... ... @@ -34,7 +34,7 @@
<el-input :disabled="editstatus" v-model="moldName"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
label="可用数量"
:rules="[{ required: true, message: '不能为空' }]"
... ... @@ -43,9 +43,9 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="24">
<el-form-item label="备注">
<el-input v-model="remark"></el-input>
<el-input type="textarea" v-model="remark"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -327,7 +327,6 @@ export default {
submit() {
let list = this.moldlist;
let listobj = [];
list.forEach((item) => {
let obj = {};
obj.modId = item.id;
... ...
... ... @@ -115,7 +115,7 @@
label="故障分类描述"
:rules="[{ required: true, message: '不能为空' }]"
>
<el-input v-model="faultTypeIntro"></el-input>
<el-input disabled v-model="faultTypeIntro"></el-input>
</el-form-item>
</el-col>
</el-row>
... ...
<template>
<sk-page-container padding="0">
<sk-list-container>
<sk-search-toolbar search-placeholder="请输入">
<sk-search-toolbar search-placeholder="请输入故障分类编码" @before-query="beforeQuery">
<el-form size="small" label-width="120px" slot-scope="query">
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="6">
<el-form-item label="故障分类编码">
<el-input v-model="query.params.userName"></el-input>
<el-input v-model="query.params.faultTypeCode"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="故障分类描述">
<el-input v-model="query.params.name"></el-input>
<el-col :span="6">
<el-form-item label="故障分类名称">
<el-input v-model="query.params.faultTypeName"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -39,11 +39,11 @@
<sk-table
auto-height
:data="faultlist"
:fetch-data="fetchData"
:columnOptions="columnOptions"
@selection-change="handleSelectionChange"
row-key="id"
indent="8"
:indent="8"
:tree-props="{
children: 'modFaultTypeRsps',
hasChildren: 'hasChildren',
... ... @@ -189,9 +189,20 @@ export default {
};
},
mounted() {
this.getList();
// this.getList();
},
methods: {
beforeQuery(params){
if (params.filter !== undefined && params.filter !== "") {
params.faultTypeCode = params.filter;
}
if (params.filter === "" || params.faultTypeCode === "") {
params.faultTypeCode = undefined
}
},
fetchData(params){
return this.getList(params)
},
handleCurrentChange(val) {
let skipCount;
},
... ... @@ -331,9 +342,22 @@ export default {
}
},
getList(params) {
return new Promise((res) => {
GettreeList(params).then((r) => {
this.faultlist = r.data;
return new Promise((r) => {
GettreeList(params).then((res) => {
// this.faultlist = r.data;
let d = {
totalCount: res.totalCount,
items: [],
};
if (!params.maxResultCount || params.maxResultCount === 0) {
params.skipCount = 0;
params.maxResultCount = 10;
}
for (let i = 0; i < res.data.length; i++) {
d.items.push(res.data[i]);
}
r(d);
// r(r.data)
});
});
},
... ...
... ... @@ -600,6 +600,18 @@ export default {
}
return new Promise((r) => {
GetList(params).then((res) => {
let list = res.items
list.forEach(item=>{
if(item.state === 0){
item.nodeName = '暂存'
}else if(item.state === 20){
item.nodeName = '审批流程'
}else if(item.state === 30){
item.nodeName = '拒绝 '
}else if(item.state === 40){
item.nodeName = '审核通过'
}
})
let d = {
totalCount: res.totalCount,
items: [],
... ...
... ... @@ -178,6 +178,8 @@
:rules="[{ required: true, message: '不能为空' }]"
>
<el-input
type="Number"
min="0"
v-model="editScrapItem.productCount"
@blur="changeProductNum"
></el-input>
... ... @@ -189,6 +191,8 @@
:rules="[{ required: true, message: '不能为空' }]"
>
<el-input
type="Number"
min="0"
v-model="editScrapItem.recordCount"
@blur="changeDiscardNum"
></el-input>
... ... @@ -208,6 +212,8 @@
:rules="[{ required: true, message: '不能为空' }]"
>
<el-input
type="Number"
min="0"
v-model="editScrapItem.productWeight"
@blur="changeProductWeight"
></el-input>
... ... @@ -218,6 +224,8 @@
<el-col :span="8">
<el-form-item label="报废重量">
<el-input
type="Number"
min="0"
v-model="editScrapItem.recordWeight"
disabled
></el-input>
... ... @@ -580,6 +588,8 @@ export default {
this.getscrapnum(params);
} else {
let define = JSON.parse(list.processDefineStruct)
console.log(define)
this.Trialfield = define.id
this.scrapInfo.recordNum = list.resdz;
this.scrapInfo.totalCount = list.totalCount;
this.scrapInfo.remark = list.remark;
... ... @@ -710,8 +720,6 @@ export default {
};
},
saveList() {
if(this.editScrapItem.productCoun === '' ||
this.editScrapItem.recordCoun === '' ||
this.editScrapItem.productWeigh === '' ||
... ...
... ... @@ -65,7 +65,11 @@
</el-col>
<el-col :span="8">
<el-form-item label="试制数量">
<el-input disabled="disabled" v-model="sznum"></el-input>
<el-input
disabled="disabled"
type="Number"
min="0"
v-model="sznum"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
... ... @@ -231,7 +235,7 @@ export default {
let that = this,
params = {
id:that.id || '',
Trialfield:that.Trialfield,
defineId:that.Trialfield,
resdz: that.Trialnum, //试制单号
remark: that.textarea, //备注
workOrderNum: that.Worknum, //工单号码
... ... @@ -249,7 +253,7 @@ export default {
let that = this,
params = {
id:that.id || '',
Trialfield:that.Trialfield,
defineId:that.Trialfield,
resdz: that.Trialnum, //试制单号
remark: that.textarea, //备注
workOrderNum: that.Worknum, //工单号码
... ...
... ... @@ -20,42 +20,42 @@
<sk-container-shadow padding="20px" title="试制单信息" style="margin-top: 24px">
<el-form label-width="100px">
<el-row>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="试制单号">
<el-input disabled v-model="Trialnum" ></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="工单号码">
<el-input disabled v-model="Worknum"></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="产品编码">
<el-input disabled v-model="productcode"></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="产品描述">
<el-input disabled v-model="productdes"></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="设备编码">
<el-input disabled v-model="equipcode"></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="模具编码">
<el-input disabled v-model="modcode"></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="试制数量">
<el-input disabled v-model="sznum"></el-input>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-col :span='8'>
<el-form-item label="试模原因">
<el-select v-model="reason" disabled>
<el-option
... ... @@ -149,7 +149,6 @@
:height="200"
:data="taskInstances"
:columnOptions="columnOptions"
style="width: 97%"
>
</sk-table>
</sk-list-container>
... ... @@ -195,6 +194,7 @@
import logoUrl from "../../assets/logo.png";
import {Trialorder, Trialapproval, Trialhistoricalnode,saveapprovalprocess,querycode} from "@/services/manageMine/userService";
import {upLoadUrl, basicUrl, getLocalTime} from "@/components/tools";
import {getprocess} from "@/services/prp/prp";
export default {
name: "moldInsertAdd",
... ... @@ -258,12 +258,12 @@ export default {
this.sznum = list.moldCode
this.reason = list.tryCause
this.textarea = list.remark
console.log(list)
this.getTrialnum()
let taskId = this.taskId = list.taskId
this.getList(taskId)
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
... ... @@ -337,7 +337,7 @@ export default {
let listimg = res.data.taskInstances
listimg.forEach(item=>{
item.approvalFields.forEach(itemnav=>{
if(itemnav.type == 'img'){
if(itemnav.type === 'img' && itemnav.value !== ''){
let urlimglist = JSON.parse(itemnav.value)
for(let i=0;i<urlimglist.length;i++){
this.urlimg = basicUrl+urlimglist[0]
... ... @@ -345,7 +345,7 @@ export default {
this.srcList.push(image)
}
}
if(itemnav.type == 'file'){
if(itemnav.type === 'file' && itemnav.value !== ''){
let filelist = JSON.parse(itemnav.value)
for(let i=0;i<filelist.length;i++){
let file = basicUrl+filelist[i]
... ... @@ -383,6 +383,8 @@ export default {
item.approvalTime = getLocalTime(item.approvalTime,'long')
})
this.taskInstances = list
console.log(this.taskInstances)
console.log(this.taskInstances)
res.data.taskInstance.approvalFields.forEach((item,index) =>{
if(item.type === 'dict'){
let params = {
... ... @@ -427,10 +429,9 @@ export default {
this.postapprovalprocess(params)
},
postapprovalprocess(params) {
let that = this
return new Promise((r) => {
saveapprovalprocess(params).then((res) => {
if(res.code === 200){
if(res.code === '200'){
this.$router.push({
path:'./trialproductionmanagement'
})
... ...
... ... @@ -662,6 +662,16 @@ export default {
orderNo: item.workOrderNum,
};
that.getTriallistexternal(params);
if(item.state === 0){
item.nodeName = '暂存'
}else if(item.state === 20){
item.nodeName = '审批流程'
}else if(item.state === 30){
item.nodeName = '拒绝 '
}else if(item.state === 40){
item.nodeName = '审核通过'
}
});
// that.Triallist = res.items;
let d = {
... ...