2c919c5d by lihua

数据申请数据范围使用上架的时间

1 parent de8bdb54
......@@ -15,7 +15,9 @@
</div>
<div class="bottom_tool_wrap">
<el-button @click="cancel">取消</el-button>
<el-button @click="save" v-show="detailInfo.approveState !== 'Y' && detailInfo.approveState !== 'C' && detailInfo.approveState !== 'R'" v-preReClick>保存</el-button>
<el-button @click="save"
v-show="detailInfo.approveState !== 'Y' && detailInfo.approveState !== 'C' && detailInfo.approveState !== 'R'"
v-preReClick>保存</el-button>
<el-button type="primary" @click="submit" v-preReClick>提交审批</el-button>
</div>
</div>
......@@ -55,7 +57,7 @@ const baseInfoFormItems = ref([{
router.push({
name: 'productSortCatalogDetail',
query: {
guid: route.query.damGuid, // 产品GUID
guid: detailInfo.value.damGuid ? detailInfo.value.damGuid : route.query.damGuid, // 产品GUID
type: 'detail', // 查看类型
foundMode: 'tdsUse', // 发现模式
name: route.query.damName, // 产品名称
......@@ -119,6 +121,12 @@ const baseInfoFormItems = ref([{
placeholder: "开始时间~结束时间",
clearable: true,
required: true,
disabledDate: (date) => {
if (productDetail.value.timeAreaStart) {
return date < new Date(productDetail.value.timeAreaStart) || date > new Date(productDetail.value.timeAreaEnd);
}
return false;
}
},
{
label: '产品发布机构',
......@@ -322,6 +330,23 @@ onBeforeMount(() => {
});
body.dispatchEvent(clickEvent);
})
getTdsRegisterCatalogDetail(detailInfo.value.damGuid).then((res: any) => {
fullscreenLoading.value = false;
if (res?.code == proxy.$passCode) {
let detail = productDetail.value = res.data || {};
let item = baseInfoFormItems.value.find(item => item.field == 'dataRange');
if (item) {
baseInfoFormItems.value[4].disabledDate = (date) => {
if (detail.timeAreaStart) {
return date < new Date(detail.timeAreaStart) || date > new Date(detail.timeAreaEnd);
}
return false;
}
}
} else {
res?.msg && proxy.$ElMessage.error(res.msg);
}
})
} else {
res?.msg && proxy.$ElMessage.error(res.msg);
}
......@@ -335,8 +360,27 @@ onBeforeMount(() => {
baseInfoFormItems.value[0].default = <string>route.query.damName;
baseInfoFormItems.value[1].default = detail.productCode;
baseInfoFormItems.value[2].default = detail.damTypeName;
let item = baseInfoFormItems.value.find(item => item.field == 'dataRange');
if (item) {
item.default = detail.timeAreaStart ? [detail.timeAreaStart, detail.timeAreaEnd] : null;
item.disabledDate = (date) => {
if (detail.timeAreaStart) {
return date < new Date(detail.timeAreaStart) || date > new Date(detail.timeAreaEnd);
}
return false;
}
}
let issuingNameItem = baseInfoFormItems.value.find(item => item.field == 'issuingName');
issuingNameItem && (issuingNameItem.default = detail.rightMainName || '--');
nextTick(() => {
const body = document.body;
const clickEvent = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window
});
body.dispatchEvent(clickEvent);
})
} else {
res?.msg && proxy.$ElMessage.error(res.msg);
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!