fix: PC维护重量

This commit is contained in:
2024-08-16 17:42:50 +08:00
parent f19fd77be6
commit 41d8512ec5
5 changed files with 130 additions and 148 deletions

View File

@@ -504,8 +504,24 @@
<el-table-column prop="split_breadth" label="子卷幅宽" :formatter="crud.formatNum3" />
<el-table-column prop="split_height" label="子卷理论长度" width="100px" :formatter="crud.formatNum3" />
<el-table-column prop="split_weight" label="子卷理论重量" width="100px" :formatter="crud.formatNum3" />
<el-table-column prop="weight" label="子卷重量" width="100px" :formatter="crud.formatNum3" />
<el-table-column prop="paper_weight" label="纸管重量" width="100px" :formatter="crud.formatNum3" />
<el-table-column prop="weight" label="子卷重量" width="100px" :formatter="crud.formatNum3">
<template slot-scope="scope">
<el-input v-show="scope.row.show_edit === '1'" v-model="scope.row.weight" type="text" />
<span v-show="scope.row.show_edit === '0'">{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column prop="paper_weight" label="纸管重量" width="100px" :formatter="crud.formatNum3">
<template slot-scope="scope">
<el-input v-show="scope.row.show_edit === '1'" v-model="scope.row.paper_weight" type="text" />
<span v-show="scope.row.show_edit === '0'">{{ scope.row.paper_weight }}</span>
</template>
</el-table-column>
<el-table-column prop="joint_type" label="接头数" width="100px" :formatter="crud.formatNum3">
<template slot-scope="scope">
<el-input v-show="scope.row.show_edit === '1'" v-model="scope.row.joint_type" type="text" />
<span v-show="scope.row.show_edit === '0'">{{ scope.row.joint_type }}</span>
</template>
</el-table-column>
<el-table-column prop="paper_tube_or_frp" label="管件类型" :formatter="formatTubeName" />
<el-table-column prop="paper_tube_material" label="纸筒物料编码" min-width="140" show-overflow-tooltip />
<el-table-column prop="paper_tube_description" label="纸筒物料描述" width="120px" show-overflow-tooltip />
@@ -530,14 +546,13 @@
<el-table-column prop="qzzno" label="气涨轴编码" width="160px" />
<el-table-column prop="start_time" label="开始时间" width="150px" />
<el-table-column prop="end_time" label="结束时间" width="150px" />
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
<el-button type="text" :disabled="scope.row.show_edit === '1'" @click="edit(scope.row, scope)">编辑</el-button>
<el-button type="text" :disabled="scope.row.show_edit === '0'" @click="cancel(scope.row)">取消</el-button>
<el-button type="text" :disabled="scope.row.show_edit === '0'" @click="save(scope.row)">保存</el-button>
</template>
</el-table-column>-->
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
@@ -596,7 +611,10 @@ const defaultForm = {
is_child_tz_ok: null,
is_child_ps_ok: null,
is_call: null,
qzzno: null
qzzno: null,
joint_type: null,
paper_weight: null,
show_edit: false
}
export default {
name: 'Slittingproductionplan',
@@ -756,6 +774,21 @@ export default {
this.crud.toQuery()
this.crud.notify('设置成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
edit(row, index) {
row.show_edit = '1'
},
cancel(row, index) {
row.show_edit = '0'
},
save(row, index) {
row.show_edit = '0'
crudSlittingproductionplan.updates(row).then(res => {
this.$message({
message: '子卷[' + row.container_name + ']信息更新成功',
type: 'success'
})
})
}
}
}

View File

@@ -71,5 +71,12 @@ export function setDirection(data) {
data
})
}
export function updates(data) {
return request({
url: 'api/slittingproductionplan',
method: 'put',
data
})
}
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection }
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates }