82df71c3 by lihua

fix: 产品上架编辑

1 parent 6a49606c
......@@ -372,7 +372,7 @@ const formInfo = ref<any>({
limit: 1,
block: false,
required: false,
// col: 'mr8',
col: 'mr8',
// style: {
// width: 'calc(33.33% - 20px)!important'
// },
......@@ -422,7 +422,7 @@ const formInfo = ref<any>({
visible: true,
col: 'mr8',
style: {
width: 'calc(33.33% - 16px)!important'
// / width: 'calc(50% - 16px)!important'
},
},
{
......@@ -637,51 +637,6 @@ const formInfo = ref<any>({
}
})
const contents = ref({
pass: [
{
type: 'form',
title: '',
formInfo: {
id: 'batch-pass-form',
items: [
{
label: '',
type: "textarea",
placeholder: "请填写通过备注(选填)",
field: "approveSuggest",
clearable: true,
maxlength: 400,
block: true,
col: 'margin_b_0',
}
]
}
}
],
reject: [
{
type: 'form',
title: '',
formInfo: {
id: 'batch-reject-form',
items: [
{
label: '',
type: "textarea",
placeholder: "请填写驳回理由(必填)",
field: "approveSuggest",
clearable: true,
maxlength: 400,
block: true,
col: 'margin_b_0',
}
]
}
}
],
});
const getProducts = () => {
getProductList({}).then((res: any) => {
if (res.code == proxy.$passCode) {
......@@ -734,6 +689,7 @@ const getProductDetail = async () => {
let coverageArea = data.coverageArea || [];
if (data.coverageArea?.[0]?.[0] == 'all') {
setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true);
console.log(formInfo.value.items);
} else {
let p: any = [];
data.coverageArea.forEach(area => {
......@@ -830,12 +786,6 @@ const submitForm = (btn, formEl, tosub = false) => {
delete params.productImgList;
params.coverageArea = subForm.value.coverageAreas == 'Y' ? [['all']] : subForm.value.coverageArea;
params.productPic = subForm.value.productImg.length ? { name: subForm.value.productImg[0].name, url: subForm.value.productImg[0].url } : {};
// if(subForm.value.isApproveGrounding == 'N'){
// params.groundingPick = []
// }
// if (params.content) {
// params.productDesc = truncateHTML(params.content, 400);
// }
console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10),
params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10),
......@@ -1149,7 +1099,7 @@ const btnClick = (btn) => {
}
).then(() => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
// assetStore.set(true);
assetStore.set(true);
router.push({
name: "productListing",
query: {},
......@@ -1162,6 +1112,7 @@ const btnClick = (btn) => {
});
} else {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
assetStore.set(true);
router.push({
name: "productListing",
query: {},
......@@ -1194,7 +1145,7 @@ const setFormItems = (row: any = null, isDetail = false) => {
} else {
item.default = row ? row[item.field] : 'N';
}
item.children.map(child => {
item.children.forEach(child => {
if (row && row.coverageArea?.[0]?.[0] == 'all') {
child.default = []
} else {
......@@ -1323,24 +1274,11 @@ const checkboxChange = async (val, info, row) => {
await setFormItems(info);
}
} else if (row.field == 'isDiscussPersonally') {
let formItem = formInfo.value.items.find(i => i.field == 'isDiscussPersonally');
if (formItem) {
formItem.default = info.isDiscussPersonally;
formItem.children[0].visible = info.isDiscussPersonally != 'Y';
await setFormItems(info);
}
}
}
const switchChange = async (val, info, row) => {
if (row.field == 'isApproveGrounding') {
let formItem = formInfo.value.items.find(i => i.field == 'autoGrounding');
if (formItem) {
formItem.children[0].default = val;
setFormItems(info);
}
}
}
......@@ -1445,18 +1383,6 @@ onBeforeMount(async () => {
proxy.$ElMessage.error(res.msg);
}
})
// getServiceTenants({
// tenantType: 3
// }).then((res: any) => {
// if (res.code == proxy.$passCode) {
// const data = res.data ?? {};
// exchangeList.value = data['3'] || [];
// let formItem = formInfo.value.items.find(f => f.field === 'exchangeGuids');
// formItem && (formItem.options = exchangeList.value);
// } else {
// ElMessage.error(res.msg);
// }
// });
getParamsList({
dictType: "数据资产目录主题名称",
}).then((res: any) => {
......@@ -1499,6 +1425,7 @@ onBeforeMount(async () => {
if (route.query.exchangeGuid) {
getTemplateInfo();
}
if (detailType && detailType != 'redit' && detailType != 'edit') {
setTimeout(() => {
formInfo.value.items.forEach(item => {
if (item.field == 'coverageAreas') {
......@@ -1506,6 +1433,7 @@ onBeforeMount(async () => {
}
})
}, 0);
}
})
......@@ -2316,7 +2244,7 @@ const rejectDialogBtnClick = (btn, info) => {
</div>
<div class="list_item is_block">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">商品详细介绍(章版):</span>
<span class="item_label">商品详细介绍(章版):</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.productDetail?.length > 0">
......@@ -2386,7 +2314,8 @@ const rejectDialogBtnClick = (btn, info) => {
<div class="list_panel">
<div class="table_panel_wrap">
<!-- <Table :tableInfo="approveTableInfo" /> -->
<ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId">
<ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId"
:processInstanceId="processInstanceId">
</ApprovalProcess>
</div>
</div>
......@@ -2440,7 +2369,7 @@ const rejectDialogBtnClick = (btn, info) => {
}}</el-button>
</div>
</div>
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="550px" :close-on-click-modal="false" >
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="550px" :close-on-click-modal="false">
<Form ref="passListingFormRef" :itemList="passFormInfo.items" :rules="passFormInfo.rules" />
<el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none"
:placeholder="dynamicPlaceholder" />
......@@ -2825,4 +2754,10 @@ const rejectDialogBtnClick = (btn, info) => {
}
}
}
:deep(.list_panel) {
.dialog-form-inline.el-form {
align-items: flex-start;
}
}
</style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!