|
@@ -29,10 +29,21 @@
|
|
|
{{ item.fileName }}
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #qualityStatus="{ item }">
|
|
|
+ <div
|
|
|
+ :style="{
|
|
|
+ cursor: item.qualityStatus > 0 ? 'pointer' : 'inherit',
|
|
|
+ color: item.qualityStatus > 0 ? '#409eff' : '',
|
|
|
+ }"
|
|
|
+ @click="item.qualityStatus > 0 ? getDtlOne(item) : () => {}"
|
|
|
+ >
|
|
|
+ {{ dictValueLabel(item.qualityStatus, qualityStatusData) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</byTable>
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
- title="到货质检"
|
|
|
+ :title="modalType == 'add' ? '到货质检' : '质检详情'"
|
|
|
v-model="dialogVisible"
|
|
|
width="80%"
|
|
|
v-loading="submitLoading"
|
|
@@ -131,11 +142,48 @@
|
|
|
@click="submitForm()"
|
|
|
size="large"
|
|
|
:loading="submitLoading"
|
|
|
+ v-if="modalType == 'add'"
|
|
|
>
|
|
|
确 定
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ :title="'质检记录'"
|
|
|
+ v-model="dialogVisibleOne"
|
|
|
+ width="600"
|
|
|
+ destroy-on-close
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfigOne"
|
|
|
+ :formOption="formOptionOne"
|
|
|
+ v-model="formData.dataOne"
|
|
|
+ :rules="rules"
|
|
|
+ ref="byformOne"
|
|
|
+ >
|
|
|
+ <template #products>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-table :data="formData.dataOne.qualityDetailsList">
|
|
|
+ <el-table-column prop="createTime" label="质检时间" width="155" />
|
|
|
+ <el-table-column prop="qualityUserName" label="质检人" />
|
|
|
+ <el-table-column label="操作" width="100" align="center">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-button type="primary" text @click="getDtl(row)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="dialogVisibleOne = false" size="large"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -168,6 +216,7 @@ const qualityStatusData = [
|
|
|
},
|
|
|
];
|
|
|
let dialogVisible = ref(false);
|
|
|
+let dialogVisibleOne = ref(false);
|
|
|
let modalType = ref("add");
|
|
|
let rules = ref({
|
|
|
qualifiedQuantity: [
|
|
@@ -234,11 +283,12 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "质检状态",
|
|
|
prop: "qualityStatus",
|
|
|
+ slot: "qualityStatus",
|
|
|
},
|
|
|
- render(status) {
|
|
|
- const current = qualityStatusData.find((x) => x.value == status);
|
|
|
- if (current) return current.label;
|
|
|
- },
|
|
|
+ // render(status) {
|
|
|
+ // const current = qualityStatusData.find((x) => x.value == status);
|
|
|
+ // if (current) return current.label;
|
|
|
+ // },
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
@@ -271,13 +321,25 @@ const config = computed(() => {
|
|
|
|
|
|
let formData = reactive({
|
|
|
data: {},
|
|
|
+ dataOne: {
|
|
|
+ qualityDetailsList: [],
|
|
|
+ },
|
|
|
});
|
|
|
const formOption = reactive({
|
|
|
+ disabled: false,
|
|
|
inline: true,
|
|
|
labelWidth: 100,
|
|
|
itemWidth: 100,
|
|
|
rules: [],
|
|
|
});
|
|
|
+const formOptionOne = reactive({
|
|
|
+ disabled: false,
|
|
|
+ inline: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ itemWidth: 100,
|
|
|
+ rules: [],
|
|
|
+});
|
|
|
+
|
|
|
const formConfig = reactive([
|
|
|
{
|
|
|
type: "title",
|
|
@@ -315,6 +377,17 @@ const formConfig = reactive([
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
+const formConfigOne = reactive([
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "质检记录",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "products",
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
const byform = ref(null);
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
@@ -378,14 +451,34 @@ const submitForm = () => {
|
|
|
);
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
+// 质检详情
|
|
|
const getDtl = (row) => {
|
|
|
+ formOption.disabled = true;
|
|
|
modalType.value = "edit";
|
|
|
dialogVisible.value = true;
|
|
|
- // proxy.post("/productionProcesses/detail", { id: row.id }).then((res) => {
|
|
|
- // formData.data = res;
|
|
|
- // dialogVisible.value = true;
|
|
|
- // });
|
|
|
+ proxy.post("/qualityInfo/detail", { id: row.id }).then((res) => {
|
|
|
+ formData.data = {
|
|
|
+ supplyName: rowData.value.supplyName,
|
|
|
+ logisticsCompanyName: rowData.value.logisticsCompanyName,
|
|
|
+ logisticsCode: rowData.value.logisticsCode,
|
|
|
+ qualityDetailsList: res.qualityDetailsList.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ quantity: x.arrivalQuantity,
|
|
|
+ })),
|
|
|
+ };
|
|
|
+ dialogVisible.value = true;
|
|
|
+ });
|
|
|
+};
|
|
|
+// 质检记录
|
|
|
+const rowData = ref({});
|
|
|
+const getDtlOne = (row) => {
|
|
|
+ rowData.value = row;
|
|
|
+ dialogVisibleOne.value = true;
|
|
|
+ proxy
|
|
|
+ .post("/qualityInfo/getList", { arrivalStockRecordsId: row.id })
|
|
|
+ .then((res) => {
|
|
|
+ formData.dataOne.qualityDetailsList = res;
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
getList();
|
|
@@ -408,6 +501,7 @@ const selectRow = (data) => {
|
|
|
};
|
|
|
|
|
|
const start = (type) => {
|
|
|
+ formOption.disabled = false;
|
|
|
modalType.value = "add";
|
|
|
let ids = [];
|
|
|
let row = {};
|
|
@@ -434,27 +528,6 @@ const start = (type) => {
|
|
|
dialogVisible.value = true;
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
-// watch(selectData, (newVal, oldVal) => {
|
|
|
-// if (newVal.length == 0) {
|
|
|
-// sourceList.value.data.forEach((x) => {
|
|
|
-// if (x.status < 20) {
|
|
|
-// x.isCheck = true;
|
|
|
-// } else {
|
|
|
-// x.isCheck = false;
|
|
|
-// }
|
|
|
-// });
|
|
|
-// } else if (newVal.length == 1) {
|
|
|
-// const current = newVal[0];
|
|
|
-// sourceList.value.data.forEach((x) => {
|
|
|
-// if (x.arrivalId !== current.arrivalId || x.status == 20) {
|
|
|
-// x.isCheck = false;
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-// });
|
|
|
-
|
|
|
-onMounted(() => {});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|