|
@@ -194,7 +194,7 @@
|
|
:summary-method="$getSummaries"
|
|
:summary-method="$getSummaries"
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
- <el-table-column align="center" type="selection" width="55" fixed="left" />
|
|
|
|
|
|
+ <el-table-column align="center" type="selection" width="55" fixed="left" :selectable="selectable" />
|
|
<el-table-column align="left" label="订单状态" prop="type" min-width="120" show-overflow-tooltip>
|
|
<el-table-column align="left" label="订单状态" prop="type" min-width="120" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.automaticStatus ? '非计划单推发货' : '计划单推发货' }}
|
|
{{ scope.row.automaticStatus ? '非计划单推发货' : '计划单推发货' }}
|
|
@@ -377,7 +377,7 @@
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('apply', $route.meta.roles) &&
|
|
$checkBtnRole('apply', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
scope.row.examineStatus === 'SAVE'
|
|
scope.row.examineStatus === 'SAVE'
|
|
"
|
|
"
|
|
style="margin-right: 10px"
|
|
style="margin-right: 10px"
|
|
@@ -389,7 +389,7 @@
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('apply', $route.meta.roles) &&
|
|
$checkBtnRole('apply', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
scope.row.examineStatus === 'WAIT'
|
|
scope.row.examineStatus === 'WAIT'
|
|
"
|
|
"
|
|
style="margin-right: 10px"
|
|
style="margin-right: 10px"
|
|
@@ -401,7 +401,7 @@
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('examine', $route.meta.roles) &&
|
|
$checkBtnRole('examine', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
scope.row.examineStatus === 'OK'
|
|
scope.row.examineStatus === 'OK'
|
|
"
|
|
"
|
|
style="margin-right: 10px"
|
|
style="margin-right: 10px"
|
|
@@ -413,7 +413,7 @@
|
|
<el-button
|
|
<el-button
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('edit', $route.meta.roles) &&
|
|
$checkBtnRole('edit', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
(scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
|
|
(scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
|
|
scope.row.type === 1
|
|
scope.row.type === 1
|
|
"
|
|
"
|
|
@@ -425,7 +425,7 @@
|
|
<el-button
|
|
<el-button
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('edit', $route.meta.roles) &&
|
|
$checkBtnRole('edit', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
(scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
|
|
(scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
|
|
scope.row.type === 2
|
|
scope.row.type === 2
|
|
"
|
|
"
|
|
@@ -437,7 +437,7 @@
|
|
<el-button
|
|
<el-button
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('examine', $route.meta.roles) &&
|
|
$checkBtnRole('examine', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
scope.row.examineStatus === 'WAIT'
|
|
scope.row.examineStatus === 'WAIT'
|
|
"
|
|
"
|
|
type="text"
|
|
type="text"
|
|
@@ -449,7 +449,7 @@
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
v-if="
|
|
v-if="
|
|
$checkBtnRole('del', $route.meta.roles) &&
|
|
$checkBtnRole('del', $route.meta.roles) &&
|
|
- scope.row.automaticStatus &&
|
|
|
|
|
|
+ !scope.row.automaticStatus &&
|
|
scope.row.examineStatus !== 'OK'
|
|
scope.row.examineStatus !== 'OK'
|
|
"
|
|
"
|
|
style="margin-left: 10px"
|
|
style="margin-left: 10px"
|
|
@@ -812,6 +812,22 @@ export default {
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.categoryList = res.data.records
|
|
this.categoryList = res.data.records
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 根据条件禁用行复选框
|
|
|
|
+ * 函数返回值为false则禁用选择(反之亦然)
|
|
|
|
+ * @param {Object} row - 行数据
|
|
|
|
+ * @param {String} index - 索引值
|
|
|
|
+ * @return Boolean
|
|
|
|
+ */
|
|
|
|
+ selectable: function (row, index) {
|
|
|
|
+ if (row.automaticStatus) {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ return true
|
|
|
|
+ // 函数必须有返回值且是布尔值
|
|
|
|
+ // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
|
|
|
|
+ // 如果没有返回值则默认返回false(全部无法选中)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|