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

增加序列号报工和修改bug

parent 080682dc
...@@ -305,8 +305,12 @@ export default { ...@@ -305,8 +305,12 @@ export default {
}) })
}, },
handleOpenTask(type){ handleOpenTask(type){
this.isVisibleTASK = true
this.title = type === 'split' ? '拆分' : '转自制' 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) { async onVendorSelected(row) {
......
...@@ -22,7 +22,12 @@ ...@@ -22,7 +22,12 @@
align="center" align="center"
prop="splitQuantity" prop="splitQuantity"
width="180" width="180"
> <template slot-scope="scope"> > <template #header>
<div>
<span class="requred-star">*</span>拆分数量
</div>
</template>
<template slot-scope="scope">
<el-input-number <el-input-number
style="width: 150px" style="width: 150px"
:step="1" :step="1"
...@@ -81,6 +86,11 @@ ...@@ -81,6 +86,11 @@
prop="workunitName" prop="workunitName"
width="200" width="200"
> >
<template #header>
<div>
<span class="requred-star">*</span>作业单元
</div>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.workunitName"> <el-input v-model="scope.row.workunitName">
<el-button <el-button
...@@ -202,16 +212,23 @@ export default { ...@@ -202,16 +212,23 @@ export default {
} }
}) })
} else { } else {
const list = this.itemList.map(v => { const list = []
return { 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, "scheduleEndDate": v.scheduleEndDate,
"scheduleStartDate": v.scheduleStartDate, "scheduleStartDate": v.scheduleStartDate,
"taskWorkunitId": v.taskWorkunitId, "taskWorkunitId": v.taskWorkunitId,
"toSelfMadeQuantity": v.toSelfMadeQuantity, "toSelfMadeQuantity": v.toSelfMadeQuantity,
"workunitCode": v.workunitCode, "workunitCode": v.workunitCode,
"workunitId": v.workunitId "workunitId": v.workunitId
} })
}) }
toSelfMade(list).then(res => { toSelfMade(list).then(res => {
if(res.code === 200) { if(res.code === 200) {
this.$modal.msgSuccess('转自制成功') this.$modal.msgSuccess('转自制成功')
...@@ -250,9 +267,12 @@ export default { ...@@ -250,9 +267,12 @@ export default {
const itemList = JSON.parse(JSON.stringify(this.selections)); const itemList = JSON.parse(JSON.stringify(this.selections));
itemList.forEach(element => { itemList.forEach(element => {
if(this.title === '拆分') { if(this.title === '拆分') {
element['splitQuantity'] = element.quantity element['splitQuantity'] = 0
} else { } else {
element['toSelfMadeQuantity'] = element.quantity element['toSelfMadeQuantity'] = element.quantity
element['workunitId'] = null;
element['workunitCode'] = null
element['workunitName'] = null;
} }
}); });
this.itemList = itemList this.itemList = itemList
...@@ -278,3 +298,10 @@ export default { ...@@ -278,3 +298,10 @@ export default {
}, },
}; };
</script> </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 @@ ...@@ -108,6 +108,11 @@
{{ scope.row.isPackage === '1'? '是': '否' }} {{ scope.row.isPackage === '1'? '是': '否' }}
</template> </template>
</el-table-column> </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="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" v-if="operation" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" v-if="operation" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -159,7 +164,7 @@ ...@@ -159,7 +164,7 @@
<el-input v-model="form.processName" placeholder="请输入工序名称" /> <el-input v-model="form.processName" placeholder="请输入工序名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="是否启用" prop="enableFlag"> <el-form-item label="是否启用" prop="enableFlag">
<el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'"> <el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'">
<el-radio <el-radio
...@@ -177,7 +182,7 @@ ...@@ -177,7 +182,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="是否包装工序" prop="isPackage"> <el-form-item label="是否包装工序" prop="isPackage">
<!-- <el-radio-group v-model="form.isPackage"> <!-- <el-radio-group v-model="form.isPackage">
<el-radio label="1">是</el-radio> <el-radio label="1">是</el-radio>
...@@ -199,6 +204,28 @@ ...@@ -199,6 +204,28 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </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-row> <el-row>
<el-col :span="24"> <el-col :span="24">
...@@ -267,6 +294,7 @@ export default { ...@@ -267,6 +294,7 @@ export default {
title: "", title: "",
form: { form: {
isPackage: '0', isPackage: '0',
isSerialReport: '0',
isExistTool: '0' isExistTool: '0'
}, },
// 是否显示弹出层 // 是否显示弹出层
...@@ -330,6 +358,7 @@ export default { ...@@ -330,6 +358,7 @@ export default {
updateTime: null updateTime: null
}; };
this.$set(this.form, 'isPackage', '0') this.$set(this.form, 'isPackage', '0')
this.$set(this.form, 'isSerialReport', '0')
this.$set(this.form, 'isExistTool', '0') this.$set(this.form, 'isExistTool', '0')
this.autoGenFlag = false; this.autoGenFlag = false;
// this.resetForm("form"); // this.resetForm("form");
......
...@@ -609,7 +609,7 @@ export default { ...@@ -609,7 +609,7 @@ export default {
}, },
hanldeGetdefaultWorkCenterList() { hanldeGetdefaultWorkCenterList() {
getdefaultWorkCenterList().then(async (res) => { getdefaultWorkCenterList().then(async (res) => {
console.log(res, 5566) res = res.filter(v => v.workstationId !== 1)
this.hanldeGetworkshopList() this.hanldeGetworkshopList()
if (res&&res.length) { if (res&&res.length) {
this.queryWorkunitParams.workshopId = res[0].workshopId this.queryWorkunitParams.workshopId = res[0].workshopId
...@@ -624,6 +624,7 @@ export default { ...@@ -624,6 +624,7 @@ export default {
}, },
async hanldeGetworkshopList() { async hanldeGetworkshopList() {
const response = await getworkshopList() const response = await getworkshopList()
console.log('response.rows', response.rows)
this.workshopList = response.rows this.workshopList = response.rows
}, },
async handleChangeWorkshopId() { async handleChangeWorkshopId() {
...@@ -637,7 +638,7 @@ export default { ...@@ -637,7 +638,7 @@ export default {
}, },
async hanldeGetworkstationList() { async hanldeGetworkstationList() {
const response = await getworkstationList({workshopId: null}) const response = await getworkstationList({workshopId: null})
this.workstationList = response.rows this.workstationList = response.rows.filter(v => v.workstationId !== 1)
}, },
handleJobAssignment() { handleJobAssignment() {
this.Assignform = { this.Assignform = {
......
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
getList() { getList() {
const itemList = JSON.parse(JSON.stringify(this.selections)); const itemList = JSON.parse(JSON.stringify(this.selections));
itemList.forEach(element => { itemList.forEach(element => {
element['toOutsourceQuantity'] = element.quantity element['toOutsourceQuantity'] = element.quantity - element.quantityQualify
element['vendorName'] = element['vendorName'] || null element['vendorName'] = element['vendorName'] || null
element['vendorId'] = element['vendorId'] || 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