提交 4881991c authored 作者: 刘旭's avatar 刘旭
...@@ -23,6 +23,17 @@ export function addCommonConfig(data: any) { ...@@ -23,6 +23,17 @@ export function addCommonConfig(data: any) {
data, data,
}); });
} }
export function manualExcute(data: any)
{
return request({
url: "/api/manual/synchronizationByParam",
method: "post",
data,
});
}
// 金蝶通用配置更新 // 金蝶通用配置更新
export function putCommonConfig(data: any) { export function putCommonConfig(data: any) {
return request({ return request({
......
...@@ -28,20 +28,21 @@ ...@@ -28,20 +28,21 @@
<el-input v-model="fieidForm.direction" placeholder="请输入单据名称" /> <el-input v-model="fieidForm.direction" placeholder="请输入单据名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"></el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="操作"> <el-form-item label="操作">
<el-select v-model="fieidForm.operation" placeholder="请选择"> <el-select v-model="fieidForm.operation" placeholder="请选择">
<el-option label="查询" value="1"></el-option> <el-option label="查询" value="1"></el-option>
<el-option label="创建/更新" value="2"></el-option> <el-option label="创建/更新" value="2"></el-option>
<el-option label="同步" value="3"></el-option> <el-option label="同步" value="3"></el-option>
<el-option label="字段匹配" value="4"></el-option>
<el-option label="映射匹配" value="5"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" <el-col :span="8"
v-if="fieidForm.operation === '1' || fieidForm.operation === '3' || fieidForm.operation === 'ERP->MES'"> v-if="fieidForm.operation === '1' || fieidForm.operation === '4' || fieidForm.operation === '3' || fieidForm.operation === 'ERP->MES'">
<el-form-item label="金蝶主键字段" prop="primaryKeyField"> <el-form-item label="唯一字段" prop="primaryKeyField">
<el-input v-model="fieidForm.primaryKeyField" placeholder="请输入金蝶主键字段" /> <el-input v-model="fieidForm.primaryKeyField" placeholder="请输入唯一字段" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" <el-col :span="8"
...@@ -107,6 +108,7 @@ ...@@ -107,6 +108,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="handleClose">关闭</el-button> <el-button @click="handleClose">关闭</el-button>
<el-button type="primary" @click="onManual" v-show="fieldTitle !== '详情'">手动执行</el-button>
<el-button type="primary" @click="onConfirm" v-show="fieldTitle !== '详情'">确认</el-button> <el-button type="primary" @click="onConfirm" v-show="fieldTitle !== '详情'">确认</el-button>
</span> </span>
</template> </template>
...@@ -116,7 +118,7 @@ ...@@ -116,7 +118,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { addCommonConfig, putCommonConfig } from '@/services/api/systemApi/fieldConfiguration/commonConfig' import { addCommonConfig, putCommonConfig, manualExcute } from '@/services/api/systemApi/fieldConfiguration/commonConfig'
import Change from 'wangeditor/dist/editor/change'; import Change from 'wangeditor/dist/editor/change';
const props = defineProps({ const props = defineProps({
...@@ -132,7 +134,7 @@ const emits = defineEmits(['initCommonConfig']) ...@@ -132,7 +134,7 @@ const emits = defineEmits(['initCommonConfig'])
const disabled = ref(false) const disabled = ref(false)
const drawerVisible = ref(false) const drawerVisible = ref(false)
const fieidRef = ref() const fieidRef = ref()
const fieldTitle = ref('新增字段') const fieldTitle = ref('新增场景')
const fieidForm = ref({ const fieidForm = ref({
sFormId: '', sFormId: '',
...@@ -178,7 +180,7 @@ const onConfirm = () => { ...@@ -178,7 +180,7 @@ const onConfirm = () => {
fieidRef.value?.validate((valid: boolean, fields: any) => { fieidRef.value?.validate((valid: boolean, fields: any) => {
if (valid) { if (valid) {
const platformProductRelationId = sessionStorage.getItem('platformProductRelationId') const platformProductRelationId = sessionStorage.getItem('platformProductRelationId')
if (fieldTitle.value === '新增字段') { if (fieldTitle.value === '新增场景') {
fieidForm.value = { ...{ platformProductRelationId }, ...fieidForm.value } fieidForm.value = { ...{ platformProductRelationId }, ...fieidForm.value }
addCommonConfig(fieidForm.value).then((res: any) => { addCommonConfig(fieidForm.value).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
...@@ -228,6 +230,11 @@ const clear = () => { ...@@ -228,6 +230,11 @@ const clear = () => {
disabled.value = false disabled.value = false
drawerVisible.value = false drawerVisible.value = false
} }
const onManual=()=>{
manualExcute({docType: fieidForm.value.docType});
}
const handleClose = () => { const handleClose = () => {
if (fieldTitle.value !== '详情') { if (fieldTitle.value !== '详情') {
if (updateCount.value > 0) { if (updateCount.value > 0) {
......
<template> <template>
<div style="padding: 20px"> <div style="padding: 20px">
<el-button type="primary" style="margin-bottom: 20px;" @click="showFieid">新增字段</el-button> <el-button type="primary" style="margin-bottom: 20px;" @click="showFieid">新增场景</el-button>
<el-table :data="fieidData" border v-loading="loading" stripe> <el-table :data="fieidData" border v-loading="loading" stripe>
<el-table-column label="docType" prop="docType" align="center" /> <el-table-column label="docType" prop="docType" align="center" />
<el-table-column label="同步顺序" prop="paiXu" align="center" /> <el-table-column label="同步顺序" prop="paiXu" align="center" />
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-link :underline="false" type="primary" @click="handleEdit(scope.row)">编辑</el-link> <el-link :underline="false" type="primary" @click="handleEdit(scope.row)">编辑</el-link>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-link :underline="false" type="danger" @click="handleDelete(scope.row.id)">删除 <el-link :underline="false" type="danger" @click="handleDelete(scope.row.id)">删除</el-link>
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -66,14 +65,14 @@ const handleCurrentChange = (value: number) => { ...@@ -66,14 +65,14 @@ const handleCurrentChange = (value: number) => {
const showFieid = () => { const showFieid = () => {
newFieldRef.value.fieldTitle = '新增字段' newFieldRef.value.fieldTitle = '新增场景'
newFieldRef.value.updateCount = 0 newFieldRef.value.updateCount = 0
newFieldRef.value.drawerVisible = true newFieldRef.value.drawerVisible = true
} }
const handleEdit = (row: any) => { const handleEdit = (row: any) => {
const data = Object.assign({}, row) const data = Object.assign({}, row)
newFieldRef.value.fieldTitle = '编辑字段' newFieldRef.value.fieldTitle = '编辑场景'
data.operation = '' + data.operation data.operation = '' + data.operation
data.isAutoPerform = '' + data.isAutoPerform data.isAutoPerform = '' + data.isAutoPerform
data.isInTransaction = '' + data.isInTransaction data.isInTransaction = '' + data.isInTransaction
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</template> </template>
</el-dropdown> </el-dropdown>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-button type="primary" link size="small" @click="selectScene(scope.row.id)">选择场景 <el-button type="primary" link size="small" @click="selectScene(scope.row.id)">场景配置
</el-button> </el-button>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-button type="primary" link size="small" @click="editProduct(scope.row)">编辑 <el-button type="primary" link size="small" @click="editProduct(scope.row)">编辑
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论