|
@@ -58,10 +58,13 @@
|
|
@click="handleShowDialogOutSourceDetails">
|
|
@click="handleShowDialogOutSourceDetails">
|
|
添加收回明细
|
|
添加收回明细
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button type="primary" icon="Check" :disabled="ids&& ids.length == 0" @click="handlePass">批量审核</el-button>
|
|
|
|
+ <el-button type="danger" icon="Close" :disabled="ids&& ids.length == 0" @click="handleFail">批量取消审核</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
- <el-table v-loading="loading" :data="form.details" size="small" border height="100%">
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="form.details" size="small" border height="100%" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column type="selection" width="48" align="center" :selectable="handleAllowSelected" />
|
|
<el-table-column label="行号" type="index" align="center" width="48" />
|
|
<el-table-column label="行号" type="index" align="center" width="48" />
|
|
<el-table-column label="批次号" align="center" prop="lotCode" width="104" />
|
|
<el-table-column label="批次号" align="center" prop="lotCode" width="104" />
|
|
<el-table-column label="产品描述" align="center" prop="productDescription" width="320" />
|
|
<el-table-column label="产品描述" align="center" prop="productDescription" width="320" />
|
|
@@ -134,6 +137,8 @@ const loading = ref(false);
|
|
const visible = ref(false);
|
|
const visible = ref(false);
|
|
const editStatus = ref(false);
|
|
const editStatus = ref(false);
|
|
const processList = ref([])
|
|
const processList = ref([])
|
|
|
|
+const ids = ref([])
|
|
|
|
+const selected = ref([])
|
|
const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
const form = ref({});
|
|
const form = ref({});
|
|
|
|
|
|
@@ -200,6 +205,24 @@ const handleShowDialogOutSourceDetails = () => {
|
|
info.supplierId = form.value.supplierId;
|
|
info.supplierId = form.value.supplierId;
|
|
proxy.$refs.dialogOutsourceDetailsRef.open(info);
|
|
proxy.$refs.dialogOutsourceDetailsRef.open(info);
|
|
};
|
|
};
|
|
|
|
+function handlePass(){
|
|
|
|
+ form.value.details.forEach(item => {
|
|
|
|
+ ids.value.forEach(id => {
|
|
|
|
+ if(item.outsourceDetailId== id){
|
|
|
|
+ item.status = 1
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+function handleFail(){
|
|
|
|
+ form.value.details.forEach(item => {
|
|
|
|
+ ids.value.forEach(id => {
|
|
|
|
+ if(item.outsourceDetailId== id){
|
|
|
|
+ item.status = 0
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+}
|
|
// 外协明细选择带回
|
|
// 外协明细选择带回
|
|
const handleMultipleSelectedOutsourceDetails = (selection) => {
|
|
const handleMultipleSelectedOutsourceDetails = (selection) => {
|
|
for (let i = 0; i < selection.length; i++) {
|
|
for (let i = 0; i < selection.length; i++) {
|
|
@@ -262,6 +285,17 @@ const handleMultipleSelectedOutsourceDetails = (selection) => {
|
|
function handleChangeAuditStatus(row) {
|
|
function handleChangeAuditStatus(row) {
|
|
console.log(row);
|
|
console.log(row);
|
|
}
|
|
}
|
|
|
|
+/**复选框选中数据 */
|
|
|
|
+function handleSelectionChange(selection) {
|
|
|
|
+ selected.value = selection
|
|
|
|
+ console.log(selection)
|
|
|
|
+ ids.value = selection.map((item) => item.outsourceDetailId);
|
|
|
|
+ console.log(ids.value)
|
|
|
|
+}
|
|
|
|
+function handleAllowSelected(row) {
|
|
|
|
+
|
|
|
|
+ return !(row.productionDeptId != 0 || (row.isApproved === 0 && row.processInspecionList && row.processInspecionList.length > 0) ||row.isProvedForCheck === 1 || row.isCheckout === 1)
|
|
|
|
+}
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
function submitForm() {
|
|
function submitForm() {
|
|
proxy.$refs["formRef"].validate(async (valid) => {
|
|
proxy.$refs["formRef"].validate(async (valid) => {
|