Commit 0d7d3f20 authored by 沈翠玲's avatar 沈翠玲

增加序列号报工和修改bug

parent 080682dc
......@@ -305,8 +305,12 @@ export default {
})
},
handleOpenTask(type){
this.isVisibleTASK = true
this.title = type === 'split' ? '拆分' : '转自制'
for(let i=0;i<this.selections.length;i++){
const v = this.selections[i]
if (v.outsourced) return this.$modal.msgWarning("已委外的数据不允许" + this.title);
}
this.isVisibleTASK = true
},
// 获取工作单元
async onVendorSelected(row) {
......
......@@ -22,7 +22,12 @@
align="center"
prop="splitQuantity"
width="180"
> <template slot-scope="scope">
> <template #header>
<div>
<span class="requred-star">*</span>拆分数量
</div>
</template>
<template slot-scope="scope">
<el-input-number
style="width: 150px"
:step="1"
......@@ -81,6 +86,11 @@
prop="workunitName"
width="200"
>
<template #header>
<div>
<span class="requred-star">*</span>作业单元
</div>
</template>
<template slot-scope="scope">
<el-input v-model="scope.row.workunitName">
<el-button
......@@ -202,16 +212,23 @@ export default {
}
})
} else {
const list = this.itemList.map(v => {
return {
const list = []
for(let i=0;i<this.itemList.length;i++){
const v = this.itemList[i]
if (!v.workunitId) {
this.$modal.msgError("作业单元必填")
reject()
return
}
list.push({
"scheduleEndDate": v.scheduleEndDate,
"scheduleStartDate": v.scheduleStartDate,
"taskWorkunitId": v.taskWorkunitId,
"toSelfMadeQuantity": v.toSelfMadeQuantity,
"workunitCode": v.workunitCode,
"workunitId": v.workunitId
}
})
})
}
toSelfMade(list).then(res => {
if(res.code === 200) {
this.$modal.msgSuccess('转自制成功')
......@@ -250,9 +267,12 @@ export default {
const itemList = JSON.parse(JSON.stringify(this.selections));
itemList.forEach(element => {
if(this.title === '拆分') {
element['splitQuantity'] = element.quantity
element['splitQuantity'] = 0
} else {
element['toSelfMadeQuantity'] = element.quantity
element['workunitId'] = null;
element['workunitCode'] = null
element['workunitName'] = null;
}
});
this.itemList = itemList
......@@ -278,3 +298,10 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.requred-star {
color: red;
font-size: 20px;
vertical-align: text-top;
}
</style>
\ No newline at end of file
......@@ -108,6 +108,11 @@
{{ scope.row.isPackage === '1'? '是': '否' }}
</template>
</el-table-column>
<el-table-column label="是否序列号报工" align="center" prop="isSerialReport">
<template slot-scope="scope">
{{ scope.row.isSerialReport === '1'? '是': '否' }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" v-if="operation" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -159,7 +164,7 @@
<el-input v-model="form.processName" placeholder="请输入工序名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="是否启用" prop="enableFlag">
<el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'">
<el-radio
......@@ -177,7 +182,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="是否包装工序" prop="isPackage">
<!-- <el-radio-group v-model="form.isPackage">
<el-radio label="1">是</el-radio>
......@@ -199,6 +204,28 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否序列号报工" prop="isSerialReport" label-width="110px">
<!-- <el-radio-group v-model="form.isSerialReport">
<el-radio label="1">是</el-radio>
<el-radio label="0">否</el-radio>
</el-radio-group> -->
<el-radio-group v-model="form.isSerialReport" disabled v-if="optType=='view'">
<el-radio
v-for="dict in dict.type.sys_yes_non"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
<el-radio-group v-model="form.isSerialReport" v-else>
<el-radio
v-for="dict in dict.type.sys_yes_non"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
......@@ -267,6 +294,7 @@ export default {
title: "",
form: {
isPackage: '0',
isSerialReport: '0',
isExistTool: '0'
},
// 是否显示弹出层
......@@ -330,6 +358,7 @@ export default {
updateTime: null
};
this.$set(this.form, 'isPackage', '0')
this.$set(this.form, 'isSerialReport', '0')
this.$set(this.form, 'isExistTool', '0')
this.autoGenFlag = false;
// this.resetForm("form");
......
......@@ -609,7 +609,7 @@ export default {
},
hanldeGetdefaultWorkCenterList() {
getdefaultWorkCenterList().then(async (res) => {
console.log(res, 5566)
res = res.filter(v => v.workstationId !== 1)
this.hanldeGetworkshopList()
if (res&&res.length) {
this.queryWorkunitParams.workshopId = res[0].workshopId
......@@ -624,6 +624,7 @@ export default {
},
async hanldeGetworkshopList() {
const response = await getworkshopList()
console.log('response.rows', response.rows)
this.workshopList = response.rows
},
async handleChangeWorkshopId() {
......@@ -637,7 +638,7 @@ export default {
},
async hanldeGetworkstationList() {
const response = await getworkstationList({workshopId: null})
this.workstationList = response.rows
this.workstationList = response.rows.filter(v => v.workstationId !== 1)
},
handleJobAssignment() {
this.Assignform = {
......
......@@ -161,7 +161,7 @@ export default {
getList() {
const itemList = JSON.parse(JSON.stringify(this.selections));
itemList.forEach(element => {
element['toOutsourceQuantity'] = element.quantity
element['toOutsourceQuantity'] = element.quantity - element.quantityQualify
element['vendorName'] = element['vendorName'] || null
element['vendorId'] = element['vendorId'] || null
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment