|
@@ -1,25 +1,16 @@
|
|
<template>
|
|
<template>
|
|
<div class="body">
|
|
<div class="body">
|
|
- <div class="opera">
|
|
|
|
- <el-switch
|
|
|
|
- v-model="value"
|
|
|
|
- size="large"
|
|
|
|
- style="--el-switch-on-color: red; --el-switch-off-color: #13ce66"
|
|
|
|
- active-text="剔除"
|
|
|
|
- inactive-text="返工"
|
|
|
|
|
|
+ <!-- 返工 -->
|
|
|
|
+ <el-scrollbar class="containerBox">
|
|
|
|
+ <div
|
|
|
|
+ style="margin-bottom: 10px; display: flex"
|
|
|
|
+ :style="{ justifyContent: !formStatus ? 'center' : '' }"
|
|
>
|
|
>
|
|
- <template #active-action>
|
|
|
|
- <span class="custom-active-action" style="font-weight: 600">T</span>
|
|
|
|
- </template>
|
|
|
|
- <template #inactive-action>
|
|
|
|
- <span class="custom-inactive-action" style="font-weight: 600">F</span>
|
|
|
|
- </template></el-switch
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <el-scrollbar class="containerBox" v-if="!value">
|
|
|
|
- <div style="margin-bottom: 10px; display: flex; justify-content: center">
|
|
|
|
- <el-button type="primary" v-if="formStatus" @click="toAdd"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ style="font-size: 16px"
|
|
|
|
+ v-if="formStatus"
|
|
|
|
+ @click="toAdd"
|
|
>新增</el-button
|
|
>新增</el-button
|
|
>
|
|
>
|
|
<el-button type="primary" v-else @click="toList">返回</el-button>
|
|
<el-button type="primary" v-else @click="toList">返回</el-button>
|
|
@@ -90,129 +81,6 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
- <el-scrollbar class="containerBox" v-else>
|
|
|
|
- <div style="margin-bottom: 10px; display: flex; justify-content: center">
|
|
|
|
- <el-button type="primary" v-if="formStatus" @click="toAdd"
|
|
|
|
- >新增</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" v-else @click="toList">返回</el-button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <template v-if="formStatus">
|
|
|
|
- <el-table class="table" :data="tableData">
|
|
|
|
- <el-table-column label="物料名称" prop="materialName" />
|
|
|
|
- <el-table-column label="状态" prop="num">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <span v-if="scope.row.state === 0">待处理</span>
|
|
|
|
- <span v-else-if="scope.row.state === 1">审核中</span>
|
|
|
|
- <span v-else-if="scope.row.state === 2">审核驳回</span>
|
|
|
|
- <span v-else-if="scope.row.state === 3">审核完成</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作">
|
|
|
|
- <template #default="{ row }">
|
|
|
|
- <el-button
|
|
|
|
- v-if="row.state === 0"
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- @click="del(row.id)"
|
|
|
|
- style="font-size: 20px"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <Pagination
|
|
|
|
- v-model:limit="limit"
|
|
|
|
- v-model:page="page"
|
|
|
|
- :position="'right'"
|
|
|
|
- :total="total"
|
|
|
|
- @pagination="getPagination"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- <el-scrollbar class="form">
|
|
|
|
- <el-form
|
|
|
|
- ref="ruleFormRef1"
|
|
|
|
- :model="ruleForm1"
|
|
|
|
- :rules="rules1"
|
|
|
|
- label-width="100"
|
|
|
|
- >
|
|
|
|
- <el-form-item label="流转卡号" prop="seqs">
|
|
|
|
- <el-select
|
|
|
|
- v-model="ruleForm1.seqs"
|
|
|
|
- multiple
|
|
|
|
- placeholder="请选择"
|
|
|
|
- value-key="value"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in infoData?.processWorkSeq"
|
|
|
|
- :key="item"
|
|
|
|
- :label="item"
|
|
|
|
- :value="item"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="发生地点" prop="address">
|
|
|
|
- <el-input v-model="ruleForm1.address" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="数量" prop="address">
|
|
|
|
- <el-input v-model="ruleForm1.remark1.num" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="问题描述" prop="remark1[content]">
|
|
|
|
- <el-input type="textarea" v-model="ruleForm1.remark1.content" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="审理级别:" prop="remark1[content]">
|
|
|
|
- <el-radio-group v-model="ruleForm1.remark1.lv">
|
|
|
|
- <el-radio value="1">一级</el-radio>
|
|
|
|
- <el-radio value="2">二级</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="填表人" prop="reason">
|
|
|
|
- <el-select
|
|
|
|
- v-model="ruleForm1.remark1.user1"
|
|
|
|
- filterable
|
|
|
|
- placeholder="请选择人员"
|
|
|
|
- value-key="id"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in dictStroe.allUsers"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.userName"
|
|
|
|
- :value="item.userName"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="发生日期" prop="reason">
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="ruleForm1.remark1.time"
|
|
|
|
- type="date"
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="指定检验人" prop="reason">
|
|
|
|
- <el-select
|
|
|
|
- v-model="ruleForm1.remark2.user2"
|
|
|
|
- filterable
|
|
|
|
- placeholder="请选择人员"
|
|
|
|
- value-key="id"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in dictStroe.allUsers"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.userName"
|
|
|
|
- :value="item.userName"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- </el-scrollbar>
|
|
|
|
- <div class="btns">
|
|
|
|
- <el-button type="primary" @click="submit1">提交</el-button>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-scrollbar>
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -279,15 +147,6 @@ const getPagination = async () => {
|
|
});
|
|
});
|
|
tableData.value = data;
|
|
tableData.value = data;
|
|
};
|
|
};
|
|
-const del = async (id) => {
|
|
|
|
- const { code } = await delError({
|
|
|
|
- id,
|
|
|
|
- });
|
|
|
|
- if (code == "200") {
|
|
|
|
- ElMessage.success("删除成功");
|
|
|
|
- getPagination1();
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
const getPagination1 = async () => {
|
|
const getPagination1 = async () => {
|
|
const { data } = await getList1({
|
|
const { data } = await getList1({
|
|
pageNo: page.value,
|
|
pageNo: page.value,
|
|
@@ -305,15 +164,7 @@ const submit = async () => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
-const submit1 = async () => {
|
|
|
|
- ruleFormRef1.value.validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- addTask1();
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error("请检查是否有未填项");
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
|
|
+
|
|
const addTask = async () => {
|
|
const addTask = async () => {
|
|
const { code } = await addRework({
|
|
const { code } = await addRework({
|
|
...ruleForm.value,
|
|
...ruleForm.value,
|
|
@@ -331,32 +182,9 @@ const addTask = async () => {
|
|
ElMessage.success("操作成功!");
|
|
ElMessage.success("操作成功!");
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-const addTask1 = async () => {
|
|
|
|
- const { code } = await addRework1({
|
|
|
|
- ...ruleForm1.value,
|
|
|
|
- materialModel: processStore.processInfo.materialModel,
|
|
|
|
- materialCode: processStore.scanInfo.materialCode,
|
|
|
|
- materialName: processStore.scanInfo.materialName,
|
|
|
|
- operationId: processStore.scanInfo.operationId,
|
|
|
|
- operationName: processStore.scanInfo.operationName,
|
|
|
|
- pid: processStore.scanInfo.id,
|
|
|
|
- workOrderCode: processStore.odersData.workOrderCode,
|
|
|
|
- orderNo: processStore.scanInfo.orderCode,
|
|
|
|
- stage: processStore.scanInfo.operationName,
|
|
|
|
- type: "eliminate",
|
|
|
|
- seqs: ruleForm1.value.seqs.join(","),
|
|
|
|
- });
|
|
|
|
- if (code == "200") {
|
|
|
|
- resetForm();
|
|
|
|
- formStatus.value = true;
|
|
|
|
- getPagination1();
|
|
|
|
- ElMessage.success("操作成功!");
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
-const value = ref(false);
|
|
|
|
-const valueStatus = ref(false);
|
|
|
|
|
|
+
|
|
const ruleFormRef = ref(null);
|
|
const ruleFormRef = ref(null);
|
|
-const ruleFormRef1 = ref(null);
|
|
|
|
|
|
+
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
const page = ref(1);
|
|
const page = ref(1);
|
|
const limit = ref(10);
|
|
const limit = ref(10);
|
|
@@ -371,33 +199,12 @@ const rules = reactive({
|
|
},
|
|
},
|
|
],
|
|
],
|
|
});
|
|
});
|
|
-const rules1 = reactive({
|
|
|
|
- location: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: "Please select a location",
|
|
|
|
- trigger: "change",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
-});
|
|
|
|
|
|
+
|
|
const selectProcessWorkSeqChange = () => {
|
|
const selectProcessWorkSeqChange = () => {
|
|
operationListByIds(ruleForm.value.seqList).then((res) => {
|
|
operationListByIds(ruleForm.value.seqList).then((res) => {
|
|
operationList.value = res.data;
|
|
operationList.value = res.data;
|
|
});
|
|
});
|
|
};
|
|
};
|
|
-
|
|
|
|
-watch(
|
|
|
|
- () => value.value,
|
|
|
|
- (val) => {
|
|
|
|
- resetForm();
|
|
|
|
- if (val == false) {
|
|
|
|
- getPagination();
|
|
|
|
- } else {
|
|
|
|
- getPagination1();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- { immediate: true }
|
|
|
|
-);
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|