Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
20dff07fe2
|
|
@ -283,13 +283,13 @@ export function createOutputs(data) {
|
||||||
|
|
||||||
export function recordInit(id) {
|
export function recordInit(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wpm/operation_record/${id}/init/`,
|
url: `/wpm/operation_record/${id}/`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//半产品复检
|
//testInit
|
||||||
export function wproductReview(data) {
|
export function testInit(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wpm/wproduct/test_init/',
|
url: '/wpm/wproduct/test_init/',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -155,9 +155,9 @@
|
||||||
<el-radio v-model="is_testok" :label="testokFalse">检查不合格</el-radio>
|
<el-radio v-model="is_testok" :label="testokFalse">检查不合格</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="dialog-footer" style="text-align: right">
|
<div class="dialog-footer" style="text-align: right">
|
||||||
<el-button @click="innerVisible = false">取 消</el-button>
|
<el-button @click="recordCancel">取 消</el-button>
|
||||||
<el-button type="primary" @click="submitfield('1')">保存</el-button>
|
<el-button type="primary" @click="submitfield('1')">保存</el-button>
|
||||||
<el-button type="primary" @click="submitfield('2')">提交</el-button>
|
<el-button type="warning" @click="submitfield('2')">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -188,21 +188,12 @@
|
||||||
type:Number,
|
type:Number,
|
||||||
default:null
|
default:null
|
||||||
},
|
},
|
||||||
origin_test: {
|
|
||||||
type:Number,
|
|
||||||
default:null
|
|
||||||
},
|
|
||||||
hasPicture:{
|
hasPicture:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:false
|
default:false
|
||||||
},
|
|
||||||
recordItem:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
debugger;
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.checkForm = {};
|
that.checkForm = {};
|
||||||
this.form = this.formID;
|
this.form = this.formID;
|
||||||
|
|
@ -214,7 +205,6 @@
|
||||||
that.formData.push(obj)
|
that.formData.push(obj)
|
||||||
});
|
});
|
||||||
that.formData=[...formData];
|
that.formData=[...formData];
|
||||||
debugger;
|
|
||||||
for(let i=0;i<this.results.length;i++){
|
for(let i=0;i<this.results.length;i++){
|
||||||
let key = this.results[i].field_key;
|
let key = this.results[i].field_key;
|
||||||
//checkForm接收表单数据的对象
|
//checkForm接收表单数据的对象
|
||||||
|
|
@ -280,9 +270,10 @@
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
filterBlock(parent,rule,index,field_key){
|
filterBlock(parent,rule,index,field_key){
|
||||||
// debugger;
|
debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
if(parent!==''&&parent!==null&&parent!==undefined){
|
if(parent!==''&&parent!==null&&parent!==undefined){
|
||||||
|
debugger;
|
||||||
if(rule!==''&&rule!==null&&rule!==undefined){
|
if(rule!==''&&rule!==null&&rule!==undefined){
|
||||||
let reg = /\{(.+?)\}/g;
|
let reg = /\{(.+?)\}/g;
|
||||||
//let str = rule.replace(temp,'').replace('$','');//=='有'
|
//let str = rule.replace(temp,'').replace('$','');//=='有'
|
||||||
|
|
@ -706,47 +697,28 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
let submit = isSubmit=='1'?false:true;
|
let submit = isSubmit=='1'?false:true;
|
||||||
if(that.recordItem){//有记录
|
that.formData.forEach((item) => {
|
||||||
that.formData.forEach((item) => {
|
if(!item.is_hidden){
|
||||||
if(!item.is_hidden){
|
that.field.push({
|
||||||
that.field.push({
|
id: item.id,
|
||||||
id: item.id,
|
field_value: that.checkForm[item.field_key],
|
||||||
field_value: that.checkForm[item.field_key],
|
is_testok: item.is_testok,//单项检查结果
|
||||||
is_testok: item.is_testok,//单项检查结果
|
is_hidden: item.is_hidden
|
||||||
is_hidden: item.is_hidden
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
that.testrecord.record_data = that.field;//检查项列表
|
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
|
||||||
that.testrecord.id = that.recordId;//记录id
|
|
||||||
if(submit){//提交
|
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
|
||||||
}else {//保存
|
|
||||||
this.$emit('recordSave',that.testrecord);
|
|
||||||
}
|
}
|
||||||
}else{//第一次操作时
|
});
|
||||||
that.formData.forEach((item) => {
|
that.testrecord.record_data = that.field;//检查项列表
|
||||||
if(!item.is_hidden){
|
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||||
that.field.push({
|
that.testrecord.id = that.recordId;//记录id
|
||||||
form_field: item.id,
|
if(submit){//提交
|
||||||
field_value: that.checkForm[item.field_key],
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
is_testok: item.is_testok,//单项检查结果
|
}else {//保存
|
||||||
is_hidden: item.is_hidden
|
this.$emit('recordSave',that.testrecord);
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if(that.origin_test!==null){
|
|
||||||
that.testrecord.origin_test = that.origin_test;
|
|
||||||
}
|
|
||||||
that.testrecord.record_data = that.field;//检查项列表
|
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
|
||||||
that.testrecord.form = that.formID;//检查表
|
|
||||||
that.testrecord.wproduct = that.wproductId;//半成品ID
|
|
||||||
that.testrecord.is_submited = submit;//提交状态false保存
|
|
||||||
this.$emit('formFunc',that.testrecord);//第一次保存或提交
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
recordCancel(){
|
||||||
|
this.$emit('recordCancel','')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col
|
<el-col
|
||||||
v-for="(item, $index) in formData"
|
v-for="(item, $index) in formData"
|
||||||
v-show="filterBlock(item.parent,item.display_expression)"
|
v-show="filterBlock(item.parent,item.display_expression,$index,item.field_key)"
|
||||||
:key="$index"
|
:key="$index"
|
||||||
:span="12"
|
:span="12"
|
||||||
style="position: relative"
|
style="position: relative"
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@input="keyChange($index,item.field_key)"
|
@input="keyChange($index,item.field_key)"
|
||||||
/>
|
/>
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@input="keyChange($index,item.field_key)"
|
@input="keyChange($index,item.field_key)"
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@input="keyChange($index,item.field_key)"
|
@input="keyChange($index,item.field_key)"
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
disabled
|
disabled
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
disabled
|
disabled
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
disabled
|
disabled
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@change="keyChange($index,item.field_key)"
|
@change="keyChange($index,item.field_key)"
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
disabled
|
disabled
|
||||||
v-model="originForm[item.field_key]"
|
v-model="item.origin_value"
|
||||||
class="halfWidth originBlock"
|
class="halfWidth originBlock"
|
||||||
multiple
|
multiple
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
@ -225,8 +225,10 @@
|
||||||
<el-radio v-model="is_testok" :label="testokFalse">检查不合格</el-radio>
|
<el-radio v-model="is_testok" :label="testokFalse">检查不合格</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="dialog-footer" style="text-align: right">
|
<div class="dialog-footer" style="text-align: right">
|
||||||
<el-button @click="innerVisible = false">取 消</el-button>
|
<el-button @click="recordCancel">取 消</el-button>
|
||||||
<el-button type="primary" @click="submitfield">提交检查项目</el-button>
|
<!--<el-button type="primary" @click="submitfield">提交检查项目</el-button>-->
|
||||||
|
<el-button type="primary" @click="submitfield('1')">保存</el-button>
|
||||||
|
<el-button type="warning" @click="submitfield('2')">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -257,7 +259,7 @@
|
||||||
type:Number,
|
type:Number,
|
||||||
default:0
|
default:0
|
||||||
},
|
},
|
||||||
origintest: {
|
recordId: {
|
||||||
type:Number,
|
type:Number,
|
||||||
default:0
|
default:0
|
||||||
},
|
},
|
||||||
|
|
@ -268,9 +270,9 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.form = this.formID;
|
that.form = this.formID;
|
||||||
let formData=this.results;
|
let formData=this.results;
|
||||||
this.origins=this.originList;
|
// that.origins=this.originList;
|
||||||
that.wproductId=this.wproduct;
|
that.wproductId=this.wproduct;
|
||||||
that.origin_test=this.origintest;
|
that.origin_test=this.origintest;
|
||||||
formData.forEach(item => {
|
formData.forEach(item => {
|
||||||
|
|
@ -297,11 +299,11 @@
|
||||||
that.judgeList.push(obj)
|
that.judgeList.push(obj)
|
||||||
});
|
});
|
||||||
//原始表的数据
|
//原始表的数据
|
||||||
for(let i=0;i<this.origins.length;i++){
|
/*for(let i=0;i<this.origins.length;i++){
|
||||||
let key = this.origins[i].field_key;
|
let key = this.origins[i].field_key;
|
||||||
that.originForm[key]=this.origins[i].field_key;
|
that.originForm[key]=this.origins[i].field_key;
|
||||||
that.$set(that.originForm,key,this.origins[i].field_value)
|
that.$set(that.originForm,key,this.origins[i].field_value)
|
||||||
}
|
}*/
|
||||||
//图片地址
|
//图片地址
|
||||||
let imag= this.formData.filter(item => {
|
let imag= this.formData.filter(item => {
|
||||||
return item.field_type === 'draw';
|
return item.field_type === 'draw';
|
||||||
|
|
@ -331,10 +333,10 @@
|
||||||
checkForm:{},
|
checkForm:{},
|
||||||
originForm:{},
|
originForm:{},
|
||||||
testrecord:{
|
testrecord:{
|
||||||
form:this.formID,
|
// form:this.formID,
|
||||||
record_data:[],
|
record_data:[],
|
||||||
is_testok:true,
|
is_testok:true,
|
||||||
wproduct:null,
|
// wproduct:null,
|
||||||
},
|
},
|
||||||
origin_test:null,
|
origin_test:null,
|
||||||
canvas:null,
|
canvas:null,
|
||||||
|
|
@ -361,7 +363,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
filterBlock(parent,rule){
|
filterBlock(parent,rule,index,field_key){
|
||||||
// debugger;
|
// debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
if(parent!==''&&parent!==null&&parent!==undefined){
|
if(parent!==''&&parent!==null&&parent!==undefined){
|
||||||
|
|
@ -408,6 +410,12 @@
|
||||||
rea = true;
|
rea = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(rea){
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
|
}
|
||||||
return rea;
|
return rea;
|
||||||
}else{
|
}else{
|
||||||
let temp =rule.match(reg)[0];
|
let temp =rule.match(reg)[0];
|
||||||
|
|
@ -415,13 +423,21 @@
|
||||||
let a = rule.replace(key, 'yy');
|
let a = rule.replace(key, 'yy');
|
||||||
a = a.replace(key, 'yy');
|
a = a.replace(key, 'yy');
|
||||||
let yy = "'"+that.checkForm[key]+"'";
|
let yy = "'"+that.checkForm[key]+"'";
|
||||||
|
if(eval(eval(a))){
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
|
}
|
||||||
return eval(eval(a));
|
return eval(eval(a));
|
||||||
// return eval("'"+y+"'"+str);
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -741,7 +757,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//提交检查项目
|
//提交检查项目
|
||||||
submitfield() {
|
submitfield(isSubmit) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let drawArr = that.formData.filter(item=>{
|
let drawArr = that.formData.filter(item=>{
|
||||||
return item.field_type==='draw';
|
return item.field_type==='draw';
|
||||||
|
|
@ -765,24 +781,39 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
that.fieldData();
|
that.fieldData(isSubmit);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fieldData(){
|
fieldData(isSubmit){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
|
let submit = isSubmit=='1'?false:true;
|
||||||
that.formData.forEach((item) => {
|
that.formData.forEach((item) => {
|
||||||
that.field.push({
|
if(!item.is_hidden){
|
||||||
form_field: item.id,
|
that.field.push({
|
||||||
field_value: that.checkForm[item.field_key],
|
id: item.id,
|
||||||
is_testok: item.is_testok//单项检查结果
|
field_value: that.checkForm[item.field_key],
|
||||||
});
|
is_testok: item.is_testok,//单项检查结果
|
||||||
|
is_hidden: item.is_hidden
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
that.testrecord.form = that.formID;//检查表
|
// that.testrecord.form = that.formID;//检查表
|
||||||
that.testrecord.record_data = that.field;//检查项列表
|
that.testrecord.record_data = that.field;//检查项列表
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||||
that.testrecord.wproduct = that.wproductId;//半成品ID
|
// that.testrecord.wproduct = that.wproductId;//半成品ID
|
||||||
this.$emit('formFunc',that.testrecord);
|
// that.testrecord.is_submited = true;
|
||||||
|
that.testrecord.id = that.recordId;
|
||||||
|
debugger;
|
||||||
|
if(submit){//提交
|
||||||
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
|
}else {//保存
|
||||||
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
recordCancel(){
|
||||||
|
this.$emit('recordCancel','')
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -183,8 +183,8 @@ export const asyncRoutes = [
|
||||||
path: 'gantt',
|
path: 'gantt',
|
||||||
name: 'gantt',
|
name: 'gantt',
|
||||||
component: () => import('@/views/pm/gantt'),
|
component: () => import('@/views/pm/gantt'),
|
||||||
meta: { title: '甘特图', perms: ['vendor_manage'] },
|
meta: { title: '甘特图', icon: 'example',perms: ['vendor_manage'] },
|
||||||
hidden: true
|
// hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
<div
|
<div
|
||||||
class="slider"
|
class="slider"
|
||||||
ref="slider"
|
ref="slider"
|
||||||
:style="{ width: '100%', display: inline-block}"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="process"
|
class="process"
|
||||||
|
|
@ -113,6 +112,8 @@ export default {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
cursor: text;
|
cursor: text;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block
|
||||||
}
|
}
|
||||||
.slider .process {
|
.slider .process {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="chart" ref="chart">
|
<div>
|
||||||
<div class="left" :style="{ width: rightLineX + 'px' }">
|
<div class="chart" ref="chart">
|
||||||
<leftMenu
|
<div class="left" :style="{ width: rightLineX + 'px' }">
|
||||||
:list="list"
|
<leftMenu
|
||||||
ref="leftMenu"
|
:list="list"
|
||||||
:BGScrollTop.sync="BGScrollTop"
|
ref="leftMenu"
|
||||||
@TableScrollTop="TableScrollTop"
|
:BGScrollTop.sync="BGScrollTop"
|
||||||
@handlerRowClick="handlerRowClick"
|
@TableScrollTop="TableScrollTop"
|
||||||
@handlerGroup="handlerGroup"
|
@handlerRowClick="handlerRowClick"
|
||||||
@handlerExpand="handlerExpand"
|
@handlerGroup="handlerGroup"
|
||||||
></leftMenu>
|
@handlerExpand="handlerExpand"
|
||||||
<div class="rightLine" :style="{ left: rightLineX + 'px' }"></div>
|
></leftMenu>
|
||||||
<div
|
<div class="rightLine" :style="{ left: rightLineX + 'px' }"></div>
|
||||||
class="rightLine"
|
|
||||||
:style="{ left: rightLineX + 'px' }"
|
|
||||||
ref="rightLine"
|
|
||||||
@mousedown="rightLineMousedown"
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
<div class="date" :style="{ left: rightLineX + 2 + 'px' }">
|
|
||||||
<div class="years" v-for="item in allDays" :key="item.year">
|
|
||||||
<div
|
<div
|
||||||
class="month"
|
class="rightLine"
|
||||||
v-for="(value, key) in item.month[0]"
|
:style="{ left: rightLineX + 'px' }"
|
||||||
:key="value + 'zz' + key"
|
ref="rightLine"
|
||||||
:style="{ width: value.length * currentDaySize.value + 'px' }"
|
@mousedown="rightLineMousedown"
|
||||||
>
|
></div>
|
||||||
<div class="month-top">{{ item.year }}年{{ key }}月</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="topMonth" v-if="showFixdTopMonth">{{ fixdTopMonth }}</div>
|
<div class="date" :style="{ left: rightLineX + 2 + 'px' }">
|
||||||
<div class="allDaysArray">
|
<div class="years" v-for="item in allDays" :key="item.year">
|
||||||
<div class="alldays">
|
|
||||||
<div
|
<div
|
||||||
v-for="(j, index) in days"
|
class="month"
|
||||||
:key="index"
|
v-for="(value, key) in item.month[0]"
|
||||||
class="day"
|
:key="value + 'zz' + key"
|
||||||
:style="{ width: currentDaySize.value + 'px' }"
|
:style="{ width: value.length * currentDaySize.value + 'px' }"
|
||||||
>
|
>
|
||||||
<template v-if="currentDaySize.value === 20">
|
<div class="month-top">{{ item.year }}年{{ key }}月</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="topMonth" v-if="showFixdTopMonth">{{ fixdTopMonth }}</div>
|
||||||
|
<div class="allDaysArray">
|
||||||
|
<div class="alldays">
|
||||||
|
<div
|
||||||
|
v-for="(j, index) in days"
|
||||||
|
:key="index"
|
||||||
|
class="day"
|
||||||
|
:style="{ width: currentDaySize.value + 'px' }"
|
||||||
|
>
|
||||||
|
<template v-if="currentDaySize.value === 20">
|
||||||
<span
|
<span
|
||||||
v-if="j.today"
|
v-if="j.today"
|
||||||
class="dateNum todayDateNum"
|
class="dateNum todayDateNum"
|
||||||
|
|
@ -46,34 +47,34 @@
|
||||||
>
|
>
|
||||||
今天
|
今天
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
class="dateNum"
|
class="dateNum"
|
||||||
:style="{
|
:style="{
|
||||||
borderLeft: index == 0 ? 'none' : '1px solid #d7d7d7'
|
borderLeft: index == 0 ? 'none' : '1px solid #d7d7d7'
|
||||||
}"
|
}"
|
||||||
:class="{
|
:class="{
|
||||||
weekday: j.weekday == 0 || j.weekday == 6,
|
weekday: j.weekday == 0 || j.weekday == 6,
|
||||||
isHover:
|
isHover:
|
||||||
j.width >= currentLineDay.start &&
|
j.width >= currentLineDay.start &&
|
||||||
j.width <= currentLineDay.end
|
j.width <= currentLineDay.end
|
||||||
}"
|
}"
|
||||||
>{{ j.date }}</span>
|
>{{ j.date }}</span>
|
||||||
<span
|
<span
|
||||||
class="dateBG"
|
class="dateBG"
|
||||||
:class="{
|
:class="{
|
||||||
weekday2: j.weekday == 0,
|
weekday2: j.weekday == 0,
|
||||||
weekday1: j.weekday == 6,
|
weekday1: j.weekday == 6,
|
||||||
today: j.today
|
today: j.today
|
||||||
}"
|
}"
|
||||||
:style="{
|
:style="{
|
||||||
width: currentDaySize.value + 'px',
|
width: currentDaySize.value + 'px',
|
||||||
height:
|
height:
|
||||||
j.weekday == 0 || j.weekday == 6 ? lineBGHeight : '0px'
|
j.weekday == 0 || j.weekday == 6 ? lineBGHeight : '0px'
|
||||||
}"
|
}"
|
||||||
></span>
|
></span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="currentDaySize.value == 10">
|
<template v-if="currentDaySize.value == 10">
|
||||||
<span
|
<span
|
||||||
class="dateNum"
|
class="dateNum"
|
||||||
:class="{
|
:class="{
|
||||||
|
|
@ -100,21 +101,21 @@
|
||||||
{{ j.date }}
|
{{ j.date }}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="dateBG"
|
class="dateBG"
|
||||||
:class="{
|
:class="{
|
||||||
weekday2: j.weekday === 0,
|
weekday2: j.weekday === 0,
|
||||||
weekday1: j.weekday === 6,
|
weekday1: j.weekday === 6,
|
||||||
today: j.today
|
today: j.today
|
||||||
}"
|
}"
|
||||||
:style="{
|
:style="{
|
||||||
width: currentDaySize.value + 'px',
|
width: currentDaySize.value + 'px',
|
||||||
height:
|
height:
|
||||||
j.weekday === 0 || j.weekday === 6 ? lineBGHeight : '0px'
|
j.weekday === 0 || j.weekday === 6 ? lineBGHeight : '0px'
|
||||||
}"
|
}"
|
||||||
></span>
|
></span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="currentDaySize.value === 2">
|
<template v-if="currentDaySize.value === 2">
|
||||||
<span
|
<span
|
||||||
class="dateNum"
|
class="dateNum"
|
||||||
:class="{
|
:class="{
|
||||||
|
|
@ -140,34 +141,36 @@
|
||||||
{{ j.date }}
|
{{ j.date }}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="dateBG weekday2"
|
class="dateBG weekday2"
|
||||||
:class="{
|
:class="{
|
||||||
today: j.today
|
today: j.today
|
||||||
}"
|
}"
|
||||||
style="border-right:none;"
|
style="border-right:none;"
|
||||||
:style="{
|
:style="{
|
||||||
width: currentDaySize.value + 'px',
|
width: currentDaySize.value + 'px',
|
||||||
height:
|
height:
|
||||||
j.weekday === 0 || j.weekday === 6 ? lineBGHeight : '0px'
|
j.weekday === 0 || j.weekday === 6 ? lineBGHeight : '0px'
|
||||||
}"
|
}"
|
||||||
></span>
|
></span>
|
||||||
</template>
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="lineBG" @scroll="handlerBGScroll" ref="lineBG">
|
||||||
<div class="lineBG" @scroll="handlerBGScroll" ref="lineBG">
|
<template v-for="(item, index) in computedList">
|
||||||
<template v-for="(item, index) in computedList">
|
<!--<div :key="item.id" class="tetst">{{item.isShow}}</div>-->
|
||||||
<!--<div :key="item.id" class="tetst">{{item.id}}</div>-->
|
<div
|
||||||
<div
|
v-show="item.isShow"
|
||||||
:ref="'line' + item.id"
|
:ref="'line' + item.id"
|
||||||
:key="item.id + index"
|
:key="item.id + index"
|
||||||
class="line"
|
|
||||||
:style="{
|
class="line"
|
||||||
|
:style="{
|
||||||
left: item.left + 'px',
|
left: item.left + 'px',
|
||||||
width: item.widthMe + 'px',
|
width: item.widthMe + 'px',
|
||||||
top: item.top + 'px'
|
top: item.top + 'px'
|
||||||
}"
|
}"
|
||||||
@mouseover="
|
@mouseover="
|
||||||
lineMouseover(
|
lineMouseover(
|
||||||
`line${item.id}`,
|
`line${item.id}`,
|
||||||
$event,
|
$event,
|
||||||
|
|
@ -176,8 +179,8 @@
|
||||||
index
|
index
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@mouseleave="lineMouseleave"
|
@mouseleave="lineMouseleave"
|
||||||
@mouseenter="
|
@mouseenter="
|
||||||
lineMouseenter(
|
lineMouseenter(
|
||||||
`line${item.id}`,
|
`line${item.id}`,
|
||||||
$event,
|
$event,
|
||||||
|
|
@ -186,88 +189,89 @@
|
||||||
index
|
index
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<slider
|
<slider
|
||||||
v-show="item.type == 1"
|
v-show="item.type == 1"
|
||||||
:id="item.id"
|
:id="item.id"
|
||||||
v-model="item.per"
|
v-model="item.per"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="item.per"
|
:max="item.per"
|
||||||
:per1="item.per1"
|
:per1="item.per1"
|
||||||
:disabled="disable"
|
:disabled="disable"
|
||||||
:widths="item.widthChild"
|
:widths="item.widthChild"
|
||||||
></slider>
|
></slider>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.type == 3"
|
v-if="item.type == 3"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
class="group"
|
class="group"
|
||||||
:style="{
|
:style="{
|
||||||
top: item.top + 'px',
|
top: item.top + 'px',
|
||||||
left: item.left + 'px',
|
left: item.left + 'px',
|
||||||
width: item.widthMe + 'px'
|
width: item.widthMe + 'px'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="progress" :style="{ width: item.per + '%' }"></div>
|
<div class="progress" :style="{ width: item.per + '%' }"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="toolTip">
|
||||||
<div class="toolTip">
|
<!--<div class="today base" @click="handleGoToday">今天</div>-->
|
||||||
<!--<div class="today base" @click="handleGoToday">今天</div>-->
|
<el-dropdown trigger="click">
|
||||||
<el-dropdown trigger="click">
|
|
||||||
<span class="base">
|
<span class="base">
|
||||||
{{this.currentDaySize.label}}
|
{{this.currentDaySize.label}}
|
||||||
<i class="el-icon-arrow-down el-icon--right"></i>
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu
|
<el-dropdown-menu
|
||||||
slot="dropdown"
|
slot="dropdown"
|
||||||
:style="{ left: this.left + 'px !important' }"
|
:style="{ left: this.left + 'px !important' }"
|
||||||
>
|
|
||||||
<el-dropdown-item
|
|
||||||
v-for="item in currentDaySizeOptions"
|
|
||||||
:key="item.value + 'ck'"
|
|
||||||
@click.native="handleSetDaySize(item)"
|
|
||||||
>
|
>
|
||||||
{{ item.label }}
|
<el-dropdown-item
|
||||||
</el-dropdown-item>
|
v-for="item in currentDaySizeOptions"
|
||||||
</el-dropdown-menu>
|
:key="item.value + 'ck'"
|
||||||
</el-dropdown>
|
@click.native="handleSetDaySize(item)"
|
||||||
</div>
|
>
|
||||||
<transition name="el-zoom-in-center">
|
{{ item.label }}
|
||||||
<div
|
</el-dropdown-item>
|
||||||
v-show="isShowMsg"
|
</el-dropdown-menu>
|
||||||
:style="{
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
<transition name="el-zoom-in-center">
|
||||||
|
<div
|
||||||
|
v-show="isShowMsg"
|
||||||
|
:style="{
|
||||||
left: currentProjectMsg.left + 'px',
|
left: currentProjectMsg.left + 'px',
|
||||||
top: currentProjectMsg.top + 'px'
|
top: currentProjectMsg.top + 'px'
|
||||||
}"
|
}"
|
||||||
class="projectMsg"
|
class="projectMsg"
|
||||||
>
|
>
|
||||||
<div class="lineMsg projectName">
|
<div class="lineMsg projectName">
|
||||||
{{ currentProjectMsg.name }}
|
{{ currentProjectMsg.name }}
|
||||||
|
</div>
|
||||||
|
<div class="lineMsg">
|
||||||
|
<span class="title">工作周期:</span>
|
||||||
|
<span>{{ currentProjectMsg.allTime }}天</span>
|
||||||
|
</div>
|
||||||
|
<div class="lineMsg">
|
||||||
|
<span class="title">当前进度:</span>
|
||||||
|
<span>{{ currentProjectMsg.per }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="lineMsg">
|
||||||
|
<span class="title">合格数量:</span>
|
||||||
|
<span>{{ currentProjectMsg.per1 }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="lineMsg">
|
||||||
|
<span class="title">开始时间:</span>
|
||||||
|
<span>{{ currentProjectMsg.startTime }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="lineMsg">
|
||||||
|
<span class="title">结束时间:</span>
|
||||||
|
<span>{{ currentProjectMsg.endTime }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lineMsg">
|
</transition>
|
||||||
<span class="title">工作周期:</span>
|
</div>
|
||||||
<span>{{ currentProjectMsg.allTime }}天</span>
|
|
||||||
</div>
|
|
||||||
<div class="lineMsg">
|
|
||||||
<span class="title">当前进度:</span>
|
|
||||||
<span>{{ currentProjectMsg.per }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="lineMsg">
|
|
||||||
<span class="title">合格数量:</span>
|
|
||||||
<span>{{ currentProjectMsg.per1 }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="lineMsg">
|
|
||||||
<span class="title">开始时间:</span>
|
|
||||||
<span>{{ currentProjectMsg.startTime }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="lineMsg">
|
|
||||||
<span class="title">结束时间:</span>
|
|
||||||
<span>{{ currentProjectMsg.endTime }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -284,8 +288,8 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//当前项是否是子集
|
|
||||||
disable: true,
|
disable: true,
|
||||||
|
//当前项是否是子集
|
||||||
isChildren: false,
|
isChildren: false,
|
||||||
dialogVal: false,
|
dialogVal: false,
|
||||||
//title
|
//title
|
||||||
|
|
@ -375,33 +379,35 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
getPlanGantt({}).then(res=>{
|
getPlanGantt({}).then(res=>{
|
||||||
if(res.code===200){
|
if(res.code===200){
|
||||||
debugger;
|
// debugger;
|
||||||
let arr =[];
|
let arr =[];
|
||||||
let list = res.data.results;
|
let list = res.data.results;
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
if (!item.children || item.children.length < 1) {
|
if (!item.children || item.children.length < 1) {
|
||||||
let startTime = new Date(item.startTime).getTime();
|
let startTime = new Date(item.start_date).getTime();
|
||||||
let endTime = new Date(item.endDate).getTime();
|
let endTime = new Date(item.end_date).getTime();
|
||||||
let obj=new Object();
|
let obj=new Object();
|
||||||
obj.name=item.number;
|
obj.name=item.number;
|
||||||
obj.id=item.id;
|
obj.id=item.id;
|
||||||
obj.top=20;
|
obj.top=20;
|
||||||
obj.startTime=startTime;
|
obj.startTime=startTime;
|
||||||
obj.endTime=endTime;
|
obj.endTime=endTime;
|
||||||
|
obj.planTime = [startTime,endTime];
|
||||||
obj.per=item.count;
|
obj.per=item.count;
|
||||||
obj.per1=item.count_real;
|
obj.per1=item.count_real;
|
||||||
obj.type=3;
|
obj.type=1;
|
||||||
|
obj.isShow= true;
|
||||||
arr.push(obj);
|
arr.push(obj);
|
||||||
} else if (item.children && item.children.length >= 1) {
|
} else if (item.children && item.children.length >= 1) {
|
||||||
let startTime = new Date(item.start_date).getTime();
|
let startTime = new Date(item.start_date).getTime();
|
||||||
let endTime = new Date(item.start_date).getTime();
|
let endTime = new Date(item.end_date).getTime();
|
||||||
debugger;
|
debugger;
|
||||||
let temp =[];
|
let temp =[];
|
||||||
let parentId = item.id;
|
let parentId = item.id;
|
||||||
let children = item.children;
|
let children = item.children;
|
||||||
children.forEach(child => {
|
children.forEach(child => {
|
||||||
let start = new Date(item.start_date).getTime();
|
let start = new Date(child.start_date).getTime();
|
||||||
let end = new Date(item.end_date).getTime();
|
let end = new Date(child.end_date).getTime();
|
||||||
let objChild = new Object();
|
let objChild = new Object();
|
||||||
objChild.name = child.number;
|
objChild.name = child.number;
|
||||||
objChild.id = child.id;
|
objChild.id = child.id;
|
||||||
|
|
@ -409,6 +415,7 @@
|
||||||
objChild.parentId=parentId;
|
objChild.parentId=parentId;
|
||||||
objChild.startTime = start;
|
objChild.startTime = start;
|
||||||
objChild.endTime = end;
|
objChild.endTime = end;
|
||||||
|
objChild.planTime = [start,end];
|
||||||
objChild.per = child.count;
|
objChild.per = child.count;
|
||||||
objChild.per1 = child.count_real;
|
objChild.per1 = child.count_real;
|
||||||
objChild.type = 1;
|
objChild.type = 1;
|
||||||
|
|
@ -422,6 +429,7 @@
|
||||||
obj.top=20;
|
obj.top=20;
|
||||||
obj.startTime=startTime;
|
obj.startTime=startTime;
|
||||||
obj.endTime=endTime;
|
obj.endTime=endTime;
|
||||||
|
obj.planTime = [startTime,endTime];
|
||||||
obj.per=item.count;
|
obj.per=item.count;
|
||||||
obj.per1=item.count_real;
|
obj.per1=item.count_real;
|
||||||
obj.type=3;
|
obj.type=3;
|
||||||
|
|
@ -430,7 +438,7 @@
|
||||||
arr.push(obj);
|
arr.push(obj);
|
||||||
}
|
}
|
||||||
that.list = arr;
|
that.list = arr;
|
||||||
that.handlerCheckList(arr);
|
that.handlerCheckList(that.list);
|
||||||
});
|
});
|
||||||
console.log(that.list);
|
console.log(that.list);
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -440,7 +448,7 @@
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
computedList() {
|
computedList() {
|
||||||
debugger;
|
// debugger;
|
||||||
console.log(this.list);
|
console.log(this.list);
|
||||||
let arr = [];
|
let arr = [];
|
||||||
this.list.forEach(item => {
|
this.list.forEach(item => {
|
||||||
|
|
@ -485,7 +493,7 @@
|
||||||
//过滤导入的数据
|
//过滤导入的数据
|
||||||
handlerCheckList(list) {
|
handlerCheckList(list) {
|
||||||
list.forEach((item, index) => {
|
list.forEach((item, index) => {
|
||||||
item.planTime = [];
|
item.planTime = [item.startTime, item.endTime];
|
||||||
item.left = this.computedTimeWidth(item.startTime);
|
item.left = this.computedTimeWidth(item.startTime);
|
||||||
item.widthMe = item.widthChild = this.computedTimeWidth(item.startTime, item.endTime) ;
|
item.widthMe = item.widthChild = this.computedTimeWidth(item.startTime, item.endTime) ;
|
||||||
item.isShow = true;
|
item.isShow = true;
|
||||||
|
|
@ -495,14 +503,11 @@
|
||||||
item.isexpand = true;
|
item.isexpand = true;
|
||||||
if (item.children.length > 0) {
|
if (item.children.length > 0) {
|
||||||
item.children.forEach((k, i) => {
|
item.children.forEach((k, i) => {
|
||||||
k.planTime = [];
|
k.planTime = [k.startTime, k.endTime];
|
||||||
k.top = item.top + i * 40 + 35;
|
k.top = item.top + i * 40 + 40;
|
||||||
k.isShow = true;
|
k.isShow = true;
|
||||||
k.left = this.computedTimeWidth(k.startTime);
|
k.left = this.computedTimeWidth(k.startTime);
|
||||||
k.widthMe = k.widthChild = this.computedTimeWidth(
|
k.widthMe = k.widthChild = this.computedTimeWidth(k.startTime,k.endTime,k);
|
||||||
k.startTime,
|
|
||||||
k.endTime
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -514,14 +519,11 @@
|
||||||
item.isexpand = true;
|
item.isexpand = true;
|
||||||
if (item.children.length > 0) {
|
if (item.children.length > 0) {
|
||||||
item.children.forEach((z, o) => {
|
item.children.forEach((z, o) => {
|
||||||
z.planTime = [];
|
z.planTime = [z.startTime, z.endTime];
|
||||||
z.top = item.top + o * 40;
|
z.top = item.top + o * 40+40;
|
||||||
z.isShow = true;
|
z.isShow = true;
|
||||||
z.left = this.computedTimeWidth(z.startTime);
|
z.left = this.computedTimeWidth(z.startTime);
|
||||||
z.widthMe = z.widthChild = this.computedTimeWidth(
|
z.widthMe = z.widthChild = this.computedTimeWidth(z.startTime, z.endTime,z);
|
||||||
z.startTime,
|
|
||||||
z.endTime
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -564,34 +566,17 @@
|
||||||
}
|
}
|
||||||
this.resetTop(rowIndex, !expand, true);
|
this.resetTop(rowIndex, !expand, true);
|
||||||
},
|
},
|
||||||
//分组添加子集
|
|
||||||
handleGroupAdd(row) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.dialogAdd.resetFields();
|
|
||||||
});
|
|
||||||
this.currentListIndex = this.list.findIndex(item => {
|
|
||||||
return item.id == row.id;
|
|
||||||
});
|
|
||||||
this.dialogVal = true;
|
|
||||||
this.isChildren = true;
|
|
||||||
},
|
|
||||||
// 根据时间计算距离
|
// 根据时间计算距离
|
||||||
computedTimeWidth(startTime, endTime) {
|
computedTimeWidth(startTime, endTime) {
|
||||||
let start = new Date(startTime).getTime();
|
|
||||||
let end = new Date(endTime).getTime();
|
|
||||||
let left =
|
|
||||||
(Math.floor(
|
|
||||||
start - new Date(`${this.currentYear - 1}/01/01`).getTime()
|
|
||||||
) /
|
|
||||||
(1000 * 60 * 60 * 24)) *
|
|
||||||
this.currentDaySize.value;
|
|
||||||
let width =
|
|
||||||
(Math.floor(end - start) / (1000 * 60 * 60 * 24)) *
|
|
||||||
this.currentDaySize.value +
|
|
||||||
this.currentDaySize.value;
|
|
||||||
if (!endTime) {
|
if (!endTime) {
|
||||||
|
let left =
|
||||||
|
(Math.floor( startTime - new Date(`${this.currentYear - 1}/01/01`).getTime() ) /
|
||||||
|
(1000 * 60 * 60 * 24)) *this.currentDaySize.value;
|
||||||
return left;
|
return left;
|
||||||
} else {
|
} else {
|
||||||
|
let width = (Math.floor(endTime - startTime) / (1000 * 60 * 60 * 24)) * this.currentDaySize.value + this.currentDaySize.value;
|
||||||
|
debugger;
|
||||||
|
console.log(width);
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -704,9 +689,8 @@
|
||||||
behavior: "smooth"
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//更改daySize
|
//更改daySize-----按天/按周/按月
|
||||||
handleSetDaySize(item) {
|
handleSetDaySize(item) {
|
||||||
// console.log(item);
|
|
||||||
this.currentDaySize = item;
|
this.currentDaySize = item;
|
||||||
this.days.forEach((item, index) => {
|
this.days.forEach((item, index) => {
|
||||||
item.width = (index + 1) * this.currentDaySize.value;
|
item.width = (index + 1) * this.currentDaySize.value;
|
||||||
|
|
@ -804,8 +788,7 @@
|
||||||
* @param {Boolean|String} time
|
* @param {Boolean|String} time
|
||||||
*/
|
*/
|
||||||
computedWithTime(width, time) {
|
computedWithTime(width, time) {
|
||||||
let startTime =
|
let startTime = (width / this.currentDaySize.value) * (1000 * 60 * 60 * 24) +
|
||||||
(width / this.currentDaySize.value) * (1000 * 60 * 60 * 24) +
|
|
||||||
new Date(`${this.currentYear - 1}/01/01`).getTime();
|
new Date(`${this.currentYear - 1}/01/01`).getTime();
|
||||||
let s = new Date(startTime);
|
let s = new Date(startTime);
|
||||||
if (time && time == true) {
|
if (time && time == true) {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.test!==null"
|
v-if="scope.row.test!==null"
|
||||||
@click="checkRecord(scope)"
|
@click="checkRecord(scope,'1')"
|
||||||
>检验记录
|
>检验记录
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -85,11 +85,22 @@
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
|
||||||
|
@click="handleInspection(scope,'2')"
|
||||||
|
>检验
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.test!==null"
|
||||||
|
@click="checkRecord(scope,'2')"
|
||||||
|
>检验记录
|
||||||
|
</el-link>
|
||||||
|
|
||||||
|
<!--<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handleInspection(scope,'2')"
|
@click="handleInspection(scope,'2')"
|
||||||
>
|
>
|
||||||
检验
|
检验
|
||||||
</el-link>
|
</el-link>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -146,8 +157,12 @@
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handlePutin(scope)"
|
@click="handlePutin(scope)"
|
||||||
>入库
|
>入库
|
||||||
</el-link
|
</el-link>
|
||||||
>
|
<el-link
|
||||||
|
v-if="scope.row.test!==null"
|
||||||
|
@click="checkRecord(scope)"
|
||||||
|
>检验记录
|
||||||
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -194,8 +209,12 @@
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handleInspection(scope)"
|
@click="handleInspection(scope)"
|
||||||
>检验
|
>检验
|
||||||
</el-link
|
</el-link>
|
||||||
>
|
<el-link
|
||||||
|
v-if="scope.row.test!==null"
|
||||||
|
@click="checkRecord(scope,'1')"
|
||||||
|
>检验记录
|
||||||
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -220,7 +239,7 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!--第一次操作时的展示-->
|
<!-- <!–第一次操作时的展示–>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="60%"
|
width="60%"
|
||||||
:title="formName"
|
:title="formName"
|
||||||
|
|
@ -232,11 +251,12 @@
|
||||||
:hasPicture="hasPicture"
|
:hasPicture="hasPicture"
|
||||||
:formID="recordform"
|
:formID="recordform"
|
||||||
:wproduct="wproduct"
|
:wproduct="wproduct"
|
||||||
:origin_test="origin_test"
|
:recordId="recordId"
|
||||||
@formFunc="formFunc"
|
@recordSubmit="recordSubmit"
|
||||||
|
@recordSave="recordSave"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--复检检验表单-->
|
<!–复检检验表单–>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="60%"
|
width="60%"
|
||||||
:title="formName"
|
:title="formName"
|
||||||
|
|
@ -248,12 +268,11 @@
|
||||||
:originList="originList"
|
:originList="originList"
|
||||||
:formID="recordform"
|
:formID="recordform"
|
||||||
:hasPicture="hasPicture"
|
:hasPicture="hasPicture"
|
||||||
:recordItem="recordItem"
|
|
||||||
:wproduct="wproduct"
|
:wproduct="wproduct"
|
||||||
:origintest="origintest"
|
:origintest="origintest"
|
||||||
@formFunc="formFunc"
|
@formFunc="formFunc"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>-->
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="outerVisible = false">
|
<el-button @click="outerVisible = false">
|
||||||
取 消
|
取 消
|
||||||
|
|
@ -261,22 +280,43 @@
|
||||||
<el-button type="primary" @click="submitrecordform(innerIndex)">填写检查项目</el-button>
|
<el-button type="primary" @click="submitrecordform(innerIndex)">填写检查项目</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--保存过的检查表显示-->
|
<!--复检检验表单-->
|
||||||
|
<el-dialog
|
||||||
|
width="60%"
|
||||||
|
:title="formName"
|
||||||
|
@close="recordCancel"
|
||||||
|
:visible.sync="limitedReview"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<reviewForm
|
||||||
|
:results="fieldList"
|
||||||
|
:originList="originList"
|
||||||
|
:formID="recordform"
|
||||||
|
:hasPicture="hasPicture"
|
||||||
|
:wproduct="wproduct"
|
||||||
|
:recordId="recordId"
|
||||||
|
@recordSave="recordSave"
|
||||||
|
@recordSubmit="recordSubmit"
|
||||||
|
@recordCancel="recordCancel"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
<!--非检查表显示-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="60%"
|
width="60%"
|
||||||
:title="formName"
|
:title="formName"
|
||||||
:visible.sync="recordVisible"
|
:visible.sync="recordVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
@close="recordCancel"
|
||||||
>
|
>
|
||||||
<customForm
|
<customForm
|
||||||
v-if="recordVisible"
|
|
||||||
:results="fieldList"
|
:results="fieldList"
|
||||||
:hasPicture="hasPicture"
|
:hasPicture="hasPicture"
|
||||||
:formID="recordform"
|
:formID="recordform"
|
||||||
:wproduct="wproduct"
|
:wproduct="wproduct"
|
||||||
:recordId="recordId"
|
:recordId="recordId"
|
||||||
:recordItem="recordItem"
|
|
||||||
@recordSubmit="recordSubmit"
|
@recordSubmit="recordSubmit"
|
||||||
@recordSave="recordSave"
|
@recordSave="recordSave"
|
||||||
|
@recordCancel="recordCancel"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
@ -314,8 +354,6 @@
|
||||||
:data="recordList"
|
:data="recordList"
|
||||||
border
|
border
|
||||||
height="400"
|
height="400"
|
||||||
@close="pageRefresh"
|
|
||||||
@closed="pageRefresh"
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="表单名称">
|
<el-table-column label="表单名称">
|
||||||
|
|
@ -387,7 +425,7 @@
|
||||||
<script>
|
<script>
|
||||||
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,wproductReview} from "@/api/wpm";
|
import {getwproductList, wproductTest, wproductPutin, createputins,testInit} from "@/api/wpm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import {getWarehouseList} from "@/api/inm";
|
import {getWarehouseList} from "@/api/inm";
|
||||||
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
|
|
@ -481,7 +519,6 @@
|
||||||
isPost: false,
|
isPost: false,
|
||||||
origin_test: null,
|
origin_test: null,
|
||||||
hasPicture: false,
|
hasPicture: false,
|
||||||
recordItem: false,
|
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
innerVisible: false,
|
innerVisible: false,
|
||||||
limitedReview: false,
|
limitedReview: false,
|
||||||
|
|
@ -554,7 +591,7 @@
|
||||||
},
|
},
|
||||||
//批量入库
|
//批量入库
|
||||||
putins() {
|
putins() {
|
||||||
let _this = this
|
let _this = this;
|
||||||
_this.mutipID = []
|
_this.mutipID = []
|
||||||
this.$refs.multipleTable.selection.forEach((item) => {
|
this.$refs.multipleTable.selection.forEach((item) => {
|
||||||
_this.mutipID.push(item.id);
|
_this.mutipID.push(item.id);
|
||||||
|
|
@ -585,28 +622,43 @@
|
||||||
//点击检验:如果有一个直接进入,如果有多个表再进行选择
|
//点击检验:如果有一个直接进入,如果有多个表再进行选择
|
||||||
handleInspection(scope,index) {
|
handleInspection(scope,index) {
|
||||||
//调该物料对应的检查表
|
//调该物料对应的检查表
|
||||||
|
debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
this.innerIndex = index;
|
this.innerIndex = index;
|
||||||
this.outerVisible = true;
|
// this.outerVisible = true;
|
||||||
this.wproduct = scope.row.id;//半成品ID
|
this.wproduct = scope.row.id;//半成品ID
|
||||||
this.wproductactstate = scope.row.act_state;//半成品状态
|
this.listQueryrecordform.material = scope.row.material_.id;//
|
||||||
this.listQueryrecordform.material = scope.row.material;//
|
|
||||||
this.listQueryrecordform.type = 2;
|
this.listQueryrecordform.type = 2;
|
||||||
this.recordform = null;
|
this.recordform = null;
|
||||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
debugger;
|
||||||
this.recordformList = response.data;
|
this.recordformList = response.data;
|
||||||
if(response.data.length===1){
|
if(response.data.length===1){
|
||||||
that.recordform = response.data[0].id;
|
that.recordform = response.data[0].id;
|
||||||
that.formName = response.data[0].name;
|
that.formName = response.data[0].name;
|
||||||
that.submitrecordform(index);
|
that.submitrecordform(index);
|
||||||
|
}else{
|
||||||
|
//弹出列表选择框
|
||||||
|
this.outerVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//检验记录
|
//选择物料检查表
|
||||||
checkRecord(scope){
|
recordformChange() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let arr = this.recordformList.filter(item => {
|
||||||
|
return item.id === that.recordform;
|
||||||
|
});
|
||||||
|
that.formName = arr[0].name;
|
||||||
|
// this.outerVisible = false;
|
||||||
|
// that.submitrecordform(that.innerIndex);
|
||||||
|
},
|
||||||
|
//检验记录
|
||||||
|
checkRecord(scope,index){
|
||||||
|
let that = this;
|
||||||
|
that.innerIndex = index;
|
||||||
that.wproduct = scope.row.id;//半成品ID
|
that.wproduct = scope.row.id;//半成品ID
|
||||||
that.limitedCheckRecord = true;
|
that.limitedCheckRecord = true;
|
||||||
getTestRecord({wproduct:scope.row.id}).then(res=>{
|
getTestRecord({wproduct:scope.row.id}).then(res=>{
|
||||||
|
|
@ -620,46 +672,79 @@
|
||||||
},
|
},
|
||||||
//点击记录里的检验
|
//点击记录里的检验
|
||||||
handleInspectionRecord(scope){
|
handleInspectionRecord(scope){
|
||||||
|
debugger;
|
||||||
let that =this;
|
let that =this;
|
||||||
that.recordVisible = false;
|
that.recordVisible = false;
|
||||||
that.recordId = scope.row.id;
|
that.recordId = scope.row.id;
|
||||||
that.recordform = scope.row.form;
|
that.recordform = scope.row.form;
|
||||||
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then((response) => {
|
that.formName = scope.row.form_.name;
|
||||||
if (response.data) {
|
if(that.innerIndex==='1'){//非复检
|
||||||
that.hasPicture = false;
|
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then((response) => {
|
||||||
let fieldList = response.data.results;
|
if (response.data) {
|
||||||
that.fieldList = [...fieldList];
|
that.hasPicture = false;
|
||||||
let arr = fieldList.filter(item => {
|
let fieldList = response.data.results;
|
||||||
return item.field_type === 'draw'
|
that.fieldList = [...fieldList];
|
||||||
});
|
let arr = fieldList.filter(item => {
|
||||||
if (arr.length > 0) {
|
return item.field_type === 'draw'
|
||||||
that.hasPicture = true;
|
});
|
||||||
|
if (arr.length > 0) {
|
||||||
|
that.hasPicture = true;
|
||||||
|
}
|
||||||
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
|
debugger;
|
||||||
|
let arr = [];
|
||||||
|
let fieldList = res.data.record_data;
|
||||||
|
for(let i=0;i<that.fieldList.length;i++){
|
||||||
|
let obj = that.fieldList[i];
|
||||||
|
obj.is_testok = null;
|
||||||
|
for(let j=0;j<fieldList.length;j++){
|
||||||
|
if(that.fieldList[i].field_key===fieldList[j].field_key){
|
||||||
|
obj.id = fieldList[j].id;
|
||||||
|
obj.is_testok = fieldList[j].is_testok;
|
||||||
|
obj.field_value = fieldList[j].field_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
}
|
||||||
|
that.fieldList = arr;
|
||||||
|
that.$nextTick(()=>{
|
||||||
|
that.recordVisible = true;
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
getTestRecordItem(scope.row.id).then((res) => {
|
});
|
||||||
debugger;
|
}else if(that.innerIndex==='2'){//复检
|
||||||
let arr = [];
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
|
if (res.data) {
|
||||||
|
that.hasPicture = false;
|
||||||
let fieldList = res.data.record_data;
|
let fieldList = res.data.record_data;
|
||||||
for(let i=0;i<that.fieldList.length;i++){
|
that.fieldList = [...fieldList];
|
||||||
|
that.origintest = res.data.origin_test;
|
||||||
|
that.recordform = res.data.origin_test_.form;
|
||||||
|
let originList = res.data.origin_test_.record_data;
|
||||||
|
that.originList = [...originList];
|
||||||
|
for (let i = 0; i < that.fieldList.length; i++) {
|
||||||
let obj = that.fieldList[i];
|
let obj = that.fieldList[i];
|
||||||
obj.is_testok = null;
|
obj.is_testok = null;
|
||||||
for(let j=0;j<fieldList.length;j++){
|
for (let j = 0; j < originList.length; j++) {
|
||||||
if(that.fieldList[i].field_key===fieldList[j].field_key){
|
if (that.fieldList[i].field_key === originList[j].field_key) {
|
||||||
obj.id = fieldList[j].id;
|
obj.id = originList[j].id;
|
||||||
obj.is_testok = fieldList[j].is_testok;
|
obj.is_testok = originList[j].is_testok;
|
||||||
obj.field_value = fieldList[j].field_value;
|
obj.field_value = originList[j].field_value;
|
||||||
|
obj.origin_value = originList[j].field_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arr.push(obj)
|
let arr = fieldList.filter(item => {
|
||||||
|
return item.field_type === 'draw'
|
||||||
|
});
|
||||||
|
if (arr.length > 0) {
|
||||||
|
that.hasPicture = true;
|
||||||
|
}
|
||||||
|
this.limitedReview = true;
|
||||||
}
|
}
|
||||||
that.fieldList = arr;
|
}
|
||||||
that.recordItem = true;
|
})
|
||||||
that.$nextTick(()=>{
|
}
|
||||||
that.recordVisible = true;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击记录里的查看
|
//点击记录里的查看
|
||||||
handleRecordDetail(scope){
|
handleRecordDetail(scope){
|
||||||
|
|
@ -667,15 +752,18 @@
|
||||||
},
|
},
|
||||||
//半产品复检
|
//半产品复检
|
||||||
handleReview() {
|
handleReview() {
|
||||||
|
debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
wproductReview({ wproduct: this.wproduct,form: that.recordform}).then((response) => {
|
testInit({ wproduct: this.wproduct,form: that.recordform}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
debugger;
|
||||||
that.hasPicture = false;
|
that.hasPicture = false;
|
||||||
that.formName = response.data.name;
|
that.recordId = response.data.id;
|
||||||
let fieldList = response.data.form_fields;
|
that.formName = response.data.form_.name;
|
||||||
|
let fieldList = response.data.record_data;
|
||||||
that.fieldList = [...fieldList];
|
that.fieldList = [...fieldList];
|
||||||
that.origintest = response.data.origin_test;
|
that.origintest = response.data.origin_test;
|
||||||
that.recordform = response.data.origin_test_.form;
|
// that.recordform = response.data.origin_test_.form;
|
||||||
let originList = response.data.origin_test_.record_data;
|
let originList = response.data.origin_test_.record_data;
|
||||||
that.originList = [...originList];
|
that.originList = [...originList];
|
||||||
let arr = fieldList.filter(item => {
|
let arr = fieldList.filter(item => {
|
||||||
|
|
@ -688,47 +776,36 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//选择物料检查表
|
|
||||||
recordformChange() {
|
|
||||||
let that = this;
|
|
||||||
let arr = this.recordformList.filter(item => {
|
|
||||||
return item.id === that.recordform;
|
|
||||||
});
|
|
||||||
that.formName = arr[0].name;
|
|
||||||
},
|
|
||||||
//根据选择的表,渲染检查项目
|
//根据选择的表,渲染检查项目
|
||||||
submitrecordform(index) {
|
submitrecordform(index) {
|
||||||
|
debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
|
this.outerVisible = false;
|
||||||
if (that.recordform != "") {
|
if (that.recordform != "") {
|
||||||
if(index==='1'){
|
if(index==='1'){//非复检
|
||||||
wproductReview({ wproduct: that.wproduct,form: that.recordform}).then((response) => {
|
testInit({ wproduct: that.wproduct,form: that.recordform}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
debugger;
|
|
||||||
that.hasPicture = false;
|
that.hasPicture = false;
|
||||||
that.origin_test = response.data.origin_test;
|
that.recordId = response.data.id;
|
||||||
that.formName = response.data.name;
|
getTestRecordItem(response.data.id).then((res) => {
|
||||||
/* let fieldList = response.data.form_fields;
|
that.formName = res.data.form_.name;
|
||||||
that.fieldList = [...fieldList];*/
|
let fieldList = res.data.record_data;
|
||||||
let list = [];
|
that.fieldList = [...fieldList];
|
||||||
let fieldList = response.data.form_fields;
|
let arr = fieldList.filter(item => {
|
||||||
for(let i=0;i<fieldList.length;i++){
|
return item.field_type === 'draw'
|
||||||
let obj = fieldList[i];
|
});
|
||||||
obj.is_testok = true;
|
if (arr.length > 0) {
|
||||||
obj.field_value = null;
|
that.hasPicture = true;
|
||||||
list.push(obj)
|
}
|
||||||
}
|
that.$nextTick(()=>{
|
||||||
that.fieldList = list;
|
that.recordVisible = true;
|
||||||
let arr = fieldList.filter(item => {
|
});
|
||||||
return item.field_type === 'draw'
|
})
|
||||||
});
|
|
||||||
if (arr.length > 0) {
|
|
||||||
that.hasPicture = true;
|
|
||||||
}
|
|
||||||
that.recordItem =false;
|
|
||||||
that.innerVisible = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if(index==='2'){
|
}else if(index==='2'){//复检
|
||||||
|
debugger;
|
||||||
that.handleReview();
|
that.handleReview();
|
||||||
}
|
}
|
||||||
} else this.$message.error("请选择检查表!");
|
} else this.$message.error("请选择检查表!");
|
||||||
|
|
@ -761,6 +838,10 @@
|
||||||
if(res.code>=200){
|
if(res.code>=200){
|
||||||
that.$message.success("成功");
|
that.$message.success("成功");
|
||||||
that.refreshRecord();
|
that.refreshRecord();
|
||||||
|
that.getList();
|
||||||
|
that.getList2();
|
||||||
|
that.getList1();
|
||||||
|
that.getList3();
|
||||||
}else{
|
}else{
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
|
@ -781,17 +862,23 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//记录保存检查项目
|
//保存检查项目
|
||||||
recordSave(value) {
|
recordSave(value) {
|
||||||
|
debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
let id = value.id;
|
let id = value.id;
|
||||||
let params = {};
|
let params = {};
|
||||||
params.record_data = value.record_data;
|
params.record_data = value.record_data;
|
||||||
params.is_testok = value.is_testok;
|
params.is_testok = value.is_testok;
|
||||||
putTestRecordItem(id,params).then((res) => {
|
putTestRecordItem(id,params).then((res) => {
|
||||||
|
debugger;
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
that.recordVisible = false;
|
that.recordVisible = false;
|
||||||
that.reload();
|
that.limitedReview = false;
|
||||||
|
that.getList();
|
||||||
|
that.getList2();
|
||||||
|
that.getList1();
|
||||||
|
that.getList3();
|
||||||
that.refreshRecord();
|
that.refreshRecord();
|
||||||
}else{
|
}else{
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
|
|
@ -812,7 +899,12 @@
|
||||||
subTestRecordItem(id,params).then((res) => {
|
subTestRecordItem(id,params).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
that.recordVisible = false;
|
that.recordVisible = false;
|
||||||
that.reload();
|
that.limitedReview = false;
|
||||||
|
that.limitedCheckRecord = false;
|
||||||
|
that.getList();
|
||||||
|
that.getList2();
|
||||||
|
that.getList1();
|
||||||
|
that.getList3();
|
||||||
that.refreshRecord();
|
that.refreshRecord();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -824,23 +916,13 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//第一次保存提交检查项目
|
//第一次保存提交检查项目
|
||||||
formFunc(value) {
|
recordCancel() {
|
||||||
let that = this;
|
this.recordVisible = false;
|
||||||
if(that.isPost){
|
this.limitedReview = false;
|
||||||
return;
|
this.getList();
|
||||||
}else{
|
this.getList2();
|
||||||
that.isPost = true;
|
this.getList1();
|
||||||
wproductTest(value).then((res) => {
|
this.getList3();
|
||||||
that.isPost = false;
|
|
||||||
if (res.code >= 200) {
|
|
||||||
that.innerVisible = false;
|
|
||||||
that.outerVisible = false;
|
|
||||||
that.reload()
|
|
||||||
}
|
|
||||||
}).catch(()=>{
|
|
||||||
this.isPost = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
pageRefresh(){
|
pageRefresh(){
|
||||||
this.reload()
|
this.reload()
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@
|
||||||
:title="fieldList.name"
|
:title="fieldList.name"
|
||||||
>
|
>
|
||||||
<el-form label-width="80px" label-position="right">
|
<el-form label-width="80px" label-position="right">
|
||||||
<el-row v-for="(item, $index) in fieldList.form_fields" :key="$index">
|
<el-row v-for="(item, $index) in fieldList.record_data" :key="$index">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="item.field_type === 'string'"
|
v-if="item.field_type === 'string'"
|
||||||
:label="item.field_name"
|
:label="item.field_name"
|
||||||
|
|
@ -782,10 +782,10 @@ export default {
|
||||||
recordconfirm() {
|
recordconfirm() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.record_data = []; //检查项目
|
_this.record_data = []; //检查项目
|
||||||
this.fieldList.form_fields.forEach((item) => {
|
this.fieldList.record_data.forEach((item) => {
|
||||||
_this.record_data.push({
|
_this.record_data.push({
|
||||||
form_field: item.id,
|
id: item.id,
|
||||||
field_value: item.sort,
|
field_value: item.field_value,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.record.record_data = _this.record_data;
|
this.record.record_data = _this.record_data;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue