rev:代码优化
This commit is contained in:
@@ -188,9 +188,9 @@
|
||||
<el-table-column
|
||||
key="10"
|
||||
prop="productin_qty"
|
||||
label="物料单桶重量(kg)"
|
||||
label="物料重量(kg)"
|
||||
:formatter="crud.formatNum3"
|
||||
:min-width="flexWidth('productin_qty',crud.data,'物料单桶重量(kg)')"
|
||||
:min-width="flexWidth('productin_qty',crud.data,'物料重量(kg)')"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
|
||||
@@ -185,8 +185,6 @@
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-dle="scope.row.status !== '0'"
|
||||
:disabled-edit="scope.row.status !== '0'"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column prop="update_by" label="修改人" :min-width="flexWidth('update_by',crud.data,'修改人')" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column v-permission="[]" label="操作" width="250px" align="center" fixed="right">
|
||||
<el-table-column v-permission="[]" label="操作" width="280px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@@ -128,6 +128,13 @@
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-pause"
|
||||
@click="handleCommand(scope.$index, scope.row,'e')"
|
||||
>
|
||||
暂停
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -258,6 +265,14 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
pause(index, row) {
|
||||
crudWork.pause(row.work_id).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
confirm(index, row) {
|
||||
crudWork.confirm(row.work_id).then(res => {
|
||||
this.crud.toQuery()
|
||||
@@ -306,6 +321,9 @@ export default {
|
||||
case 'd':// 确认
|
||||
this.confirm('4', row)
|
||||
break
|
||||
case 'e':// 暂停
|
||||
this.pause('5', row)
|
||||
break
|
||||
}
|
||||
},
|
||||
showButton(point_status) {
|
||||
|
||||
@@ -80,4 +80,12 @@ export function confirm(work_id) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeUsed, getWorkList, changeLock, reSend, send, finish, confirm }
|
||||
export function pause(work_id) {
|
||||
return request({
|
||||
url: 'api/work/pause/' + work_id,
|
||||
method: 'post',
|
||||
data: work_id
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeUsed, getWorkList, changeLock, reSend, send, finish, confirm, pause }
|
||||
|
||||
Reference in New Issue
Block a user