|
@@ -17,12 +17,13 @@
|
|
@size-change="dataList"
|
|
@size-change="dataList"
|
|
@current-change="dataList"
|
|
@current-change="dataList"
|
|
>
|
|
>
|
|
- <template #imgUrl-form="scope">
|
|
|
|
- <single-upload v-model="form.imgUrl" />
|
|
|
|
|
|
+ <template #filePath-form="scope">
|
|
|
|
+ <single-upload v-model="form.filePath" />
|
|
|
|
+ <!-- <FilesUpload v-model:src="form.filePath" v-model:src-list="form.filePath" /> -->
|
|
</template>
|
|
</template>
|
|
- <template #imgUrl="{ row }">
|
|
|
|
|
|
+ <template #filePath="{ row }">
|
|
<el-button link type="primary" @click.stop="imgUrlClick(row)">{{
|
|
<el-button link type="primary" @click.stop="imgUrlClick(row)">{{
|
|
- row.imgUrl
|
|
|
|
|
|
+ row.filePath
|
|
}}</el-button>
|
|
}}</el-button>
|
|
</template>
|
|
</template>
|
|
</avue-crud>
|
|
</avue-crud>
|
|
@@ -41,7 +42,7 @@
|
|
import { ref, getCurrentInstance } from "vue";
|
|
import { ref, getCurrentInstance } from "vue";
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
import { getTableConfig } from "./configs";
|
|
import { getTableConfig } from "./configs";
|
|
-import { saveCompoents } from "@/api/craft/process/index";
|
|
|
|
|
|
+import { saveCompoents, getBomVersion } from "@/api/craft/process/index";
|
|
import SingleUpload from "@/components/Upload/SingleUpload.vue";
|
|
import SingleUpload from "@/components/Upload/SingleUpload.vue";
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -72,15 +73,33 @@ const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
|
|
|
const startCreat = () => {
|
|
const startCreat = () => {
|
|
if (props.tableType === "wuliaocaiji") {
|
|
if (props.tableType === "wuliaocaiji") {
|
|
- //根据物料编码获取对应的物料BOM
|
|
|
|
- commonTableRef.value &&
|
|
|
|
- commonTableRef.value.startSelect(
|
|
|
|
- {
|
|
|
|
- materialCode: route.query.prodtCode,
|
|
|
|
- bomVersion: 1.0,
|
|
|
|
- },
|
|
|
|
- { tableName: "wuliaocaiji" }
|
|
|
|
- );
|
|
|
|
|
|
+ commonTableType.value = "MARTERIAL_BOM";
|
|
|
|
+ if (!route.query.prodtCode) {
|
|
|
|
+ ElMessage.error("物料编号读取错误");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //根据物料编码和版本号获取对应的物料BOM
|
|
|
|
+ let bomParam = {
|
|
|
|
+ materialCode: route.query.prodtCode,
|
|
|
|
+ };
|
|
|
|
+ getBomVersion(bomParam).then((res) => {
|
|
|
|
+ let resListMap = [];
|
|
|
|
+ //说明时物料采集的添加框 进行物料采集的下拉框数据获取
|
|
|
|
+ res?.data.forEach((versions) => {
|
|
|
|
+ resListMap.push({
|
|
|
|
+ label: versions.bomVersion,
|
|
|
|
+ value: versions.bomVersion,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ //根据物料编码和版本号获取对应的物料BOM
|
|
|
|
+ commonTableRef.value?.startSelect({
|
|
|
|
+ materialCode: route.query.prodtCode,
|
|
|
|
+ });
|
|
|
|
+ commonTableRef.value?.refreshDictData("bomVersion", resListMap, "value");
|
|
|
|
+ });
|
|
|
|
+ } else if (props.tableType === "dianjian") {
|
|
|
|
+ commonTableType.value = "OP_CHECK";
|
|
|
|
+ commonTableRef.value?.startSelect();
|
|
} else {
|
|
} else {
|
|
crudRef.value && crudRef.value.rowAdd();
|
|
crudRef.value && crudRef.value.rowAdd();
|
|
}
|
|
}
|
|
@@ -111,6 +130,10 @@ const onSelectedFinish = (itemValue) => {
|
|
form.value.num = itemValue.bomMaterialNumber;
|
|
form.value.num = itemValue.bomMaterialNumber;
|
|
form.value.traceType = "S";
|
|
form.value.traceType = "S";
|
|
form.value.unit = itemValue.unitDictValue;
|
|
form.value.unit = itemValue.unitDictValue;
|
|
|
|
+ } else if (props.tableType === "dianjian") {
|
|
|
|
+ form.value.checkName = itemValue.checkName;
|
|
|
|
+ form.value.checkCode = itemValue.checkCode;
|
|
|
|
+ form.value.content = itemValue.content;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|