zuoyezhidaoshu
This commit is contained in:
commit
45ed6d407a
|
@ -272,6 +272,13 @@ export function createUsedstep(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function updateUsedstep(id,data) {
|
||||||
|
return request({
|
||||||
|
url: `/mtm/usedstep/${id}/`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
export function deleteUsedstep(id, data) {
|
export function deleteUsedstep(id, data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/mtm/usedstep/${id}/`,
|
url: `/mtm/usedstep/${id}/`,
|
||||||
|
|
|
@ -196,10 +196,6 @@
|
||||||
isDisabled:{
|
isDisabled:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:false
|
default:false
|
||||||
},
|
|
||||||
isMidTesting:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -235,13 +231,11 @@
|
||||||
let listJudge = this.formData.filter(item => {
|
let listJudge = this.formData.filter(item => {
|
||||||
return item.need_judge === true;
|
return item.need_judge === true;
|
||||||
});
|
});
|
||||||
debugger;
|
|
||||||
listJudge.forEach(item => {
|
listJudge.forEach(item => {
|
||||||
let obj = new Object();
|
let obj = new Object();
|
||||||
obj = item;
|
obj = item;
|
||||||
that.judgeList.push(obj)
|
that.judgeList.push(obj)
|
||||||
});
|
});
|
||||||
debugger;
|
|
||||||
let imag= this.formData.filter(item => {
|
let imag= this.formData.filter(item => {
|
||||||
return item.field_type === 'draw';
|
return item.field_type === 'draw';
|
||||||
});
|
});
|
||||||
|
@ -727,7 +721,7 @@
|
||||||
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.id = that.recordId;//记录id
|
that.testrecord.id = that.recordId;//记录id
|
||||||
if(submit&&that.isMidTesting!==true){//提交
|
if(submit){//提交
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
}else {//保存
|
}else {//保存
|
||||||
this.$emit('recordSave',that.testrecord);
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
|
|
@ -818,7 +818,8 @@
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||||
that.testrecord.id = that.recordId;
|
that.testrecord.id = that.recordId;
|
||||||
// debugger;
|
// debugger;
|
||||||
if(submit&&that.isMidTesting!==true){//提交
|
// if(submit&&that.isMidTesting!==true){//提交
|
||||||
|
if(submit){//提交
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
}else {//保存
|
}else {//保存
|
||||||
this.$emit('recordSave',that.testrecord);
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1011,7 +1011,9 @@
|
||||||
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.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material_.id;//
|
debugger;
|
||||||
|
console.log(scope.row.material_check);
|
||||||
|
this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material;//
|
||||||
this.listQueryrecordform.type = 2;
|
this.listQueryrecordform.type = 2;
|
||||||
this.listQueryrecordform.enabled = true;
|
this.listQueryrecordform.enabled = true;
|
||||||
this.recordform = null;
|
this.recordform = null;
|
||||||
|
|
|
@ -12,16 +12,6 @@ class Migration(migrations.Migration):
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
|
||||||
model_name='wproduct',
|
|
||||||
name='material_check',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='wp_material_check', to='mtm.material', verbose_name='按物料状态检查'),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='wproductflow',
|
|
||||||
name='material_check',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='wpf_material_check', to='mtm.material', verbose_name='按物料状态检查'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='wproduct',
|
model_name='wproduct',
|
||||||
name='child',
|
name='child',
|
||||||
|
|
|
@ -91,9 +91,6 @@ class WProduct(CommonAModel):
|
||||||
material = models.ForeignKey(
|
material = models.ForeignKey(
|
||||||
Material, verbose_name='所属物料状态', on_delete=models.CASCADE,
|
Material, verbose_name='所属物料状态', on_delete=models.CASCADE,
|
||||||
related_name='wp_material')
|
related_name='wp_material')
|
||||||
material_check = models.ForeignKey(
|
|
||||||
Material, verbose_name='按物料状态检查', on_delete=models.CASCADE,
|
|
||||||
null=True, blank=True, related_name='wp_material_check')
|
|
||||||
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
||||||
on_delete=models.CASCADE, related_name='wp_pre_step')
|
on_delete=models.CASCADE, related_name='wp_pre_step')
|
||||||
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
||||||
|
@ -170,9 +167,6 @@ class WproductFlow(CommonAModel):
|
||||||
number = models.CharField('物品编号', null=True, blank=True, max_length=50)
|
number = models.CharField('物品编号', null=True, blank=True, max_length=50)
|
||||||
material = models.ForeignKey(
|
material = models.ForeignKey(
|
||||||
Material, verbose_name='所属物料状态', on_delete=models.CASCADE, related_name='wpf_material')
|
Material, verbose_name='所属物料状态', on_delete=models.CASCADE, related_name='wpf_material')
|
||||||
material_check = models.ForeignKey(
|
|
||||||
Material, verbose_name='按物料状态检查', on_delete=models.CASCADE,
|
|
||||||
null=True, blank=True, related_name='wpf_material_check')
|
|
||||||
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
||||||
on_delete=models.CASCADE, related_name='wpf_pre_step')
|
on_delete=models.CASCADE, related_name='wpf_pre_step')
|
||||||
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
||||||
|
|
|
@ -684,10 +684,10 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
||||||
newstep, needTest = WpmService.get_next_step(wsp, step)
|
newstep, needTest = WpmService.get_next_step(wsp, step)
|
||||||
wp.step = newstep
|
wp.step = newstep
|
||||||
wp.pre_step = step
|
wp.pre_step = step
|
||||||
|
wp.material = wsp.product
|
||||||
|
|
||||||
if step == newstep:
|
if step == newstep:
|
||||||
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||||
wp.material = wsp.product
|
|
||||||
if wp.test:# 如果有正在进行的工序中检验
|
if wp.test:# 如果有正在进行的工序中检验
|
||||||
wp.test.is_midtesting = False
|
wp.test.is_midtesting = False
|
||||||
wp.test.is_submited = False
|
wp.test.is_submited = False
|
||||||
|
@ -696,7 +696,6 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
||||||
wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
if needTest:
|
if needTest:
|
||||||
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||||
wp.material_check = wsp.product
|
|
||||||
|
|
||||||
wp.operation = None
|
wp.operation = None
|
||||||
wp.update_by = request.user
|
wp.update_by = request.user
|
||||||
|
|
Loading…
Reference in New Issue