|
@@ -485,7 +485,9 @@ import CompanyProduct from "@/views/EHSD/productLibrary/companyProduct/index";
|
|
|
import CustomerProduct from "@/views/EHSD/productLibrary/customerProduct/index";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import selectCity from "@/components/selectCity/index.vue";
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
|
|
+const route = useRoute();
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const innerMethod = ref([]);
|
|
|
const outsideMethod = ref([]);
|
|
@@ -532,7 +534,7 @@ const formOption = reactive({
|
|
|
labelWidth: 100,
|
|
|
itemWidth: 100,
|
|
|
rules: [],
|
|
|
- disabled: judgeStatus()
|
|
|
+ disabled: false
|
|
|
});
|
|
|
const uploadData = ref({});
|
|
|
const indicationUploadData = ref({});
|
|
@@ -1049,6 +1051,38 @@ const handleSubmit = async () => {
|
|
|
const props = defineProps({
|
|
|
queryData: Object,
|
|
|
});
|
|
|
+watch(
|
|
|
+ props.queryData,
|
|
|
+ () => {
|
|
|
+ formOption.disabled = judgeStatus();
|
|
|
+ if (props.queryData && (route.query.processType == 10 || route.query.processType == 20)) {
|
|
|
+ for (var text in props.queryData) {
|
|
|
+ if (text === "fileList" || text === "packageFileList") {
|
|
|
+ if (props.queryData[text] && props.queryData[text].length > 0) {
|
|
|
+ formData.data[text] = props.queryData[text].map((item) => {
|
|
|
+ return {
|
|
|
+ raw: item,
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.fileUrl,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ formData.data[text] = props.queryData[text];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (formData.data.countryId) {
|
|
|
+ getCityData(formData.data.countryId, "20");
|
|
|
+ }
|
|
|
+ if (formData.data.provinceId) {
|
|
|
+ getCityData(formData.data.provinceId, "30");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ deep: true,
|
|
|
+ }
|
|
|
+);
|
|
|
const clickCustomerProduct = () => {
|
|
|
if (!formData.data.buyCorporationId) {
|
|
|
return ElMessage("请先选择客户");
|