Commit 5b373c1b authored by 沈翠玲's avatar 沈翠玲

添加ERP数据同步按钮

parent 6931d16c
...@@ -42,3 +42,11 @@ export function delClient(clientId) { ...@@ -42,3 +42,11 @@ export function delClient(clientId) {
method: 'delete' method: 'delete'
}) })
} }
// 同步ERP数据
export function syncData() {
return request({
url: '/mes/md/client/syncData',
method: 'post'
})
}
\ No newline at end of file
...@@ -50,3 +50,11 @@ export function becomeFormalProduct(itemId) { ...@@ -50,3 +50,11 @@ export function becomeFormalProduct(itemId) {
method: 'put' method: 'put'
}) })
} }
// 同步ERP数据
export function syncData() {
return request({
url: '/mes/md/mditem/syncData',
method: 'post'
})
}
...@@ -42,3 +42,12 @@ export function delVendor(vendorId) { ...@@ -42,3 +42,12 @@ export function delVendor(vendorId) {
method: 'delete' method: 'delete'
}) })
} }
// 同步ERP数据
export function syncData() {
return request({
url: '/mes/md/vendor/syncData',
method: 'post'
})
}
...@@ -126,3 +126,11 @@ export function printInfo(workorderId) { ...@@ -126,3 +126,11 @@ export function printInfo(workorderId) {
method: 'get' method: 'get'
}) })
} }
// 同步ERP数据
export function syncData() {
return request({
url: '/mes/pro/workorder/syncData',
method: 'post'
})
}
...@@ -49,3 +49,11 @@ export function delWarehouse(warehouseId) { ...@@ -49,3 +49,11 @@ export function delWarehouse(warehouseId) {
method: 'delete' method: 'delete'
}) })
} }
// 同步ERP数据
export function syncData() {
return request({
url: '/mes/wm/warehouse/syncData',
method: 'post'
})
}
\ No newline at end of file
...@@ -2959,5 +2959,6 @@ ...@@ -2959,5 +2959,6 @@
"分配角色": "分配角色", "分配角色": "分配角色",
"菜单字段": "menuName", "菜单字段": "menuName",
"工时单位必选": "工时单位必选", "工时单位必选": "工时单位必选",
"委外加工商必选": "委外加工商必选" "委外加工商必选": "委外加工商必选",
"ERP数据同步": "ERP数据同步"
} }
...@@ -103,6 +103,10 @@ ...@@ -103,6 +103,10 @@
v-hasPermi="['mes:md:client:remove']" v-hasPermi="['mes:md:client:remove']"
>{{$t('删除')}}</el-button> >{{$t('删除')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="success" plain size="mini"
@click="handleSyncData">{{$t('ERP数据同步')}}</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -269,7 +273,7 @@ ...@@ -269,7 +273,7 @@
<script> <script>
import {listClient, getClient, delClient, addClient, updateClient} from "@/api/mes/md/client"; import {listClient, getClient, delClient, addClient, updateClient, syncData} from "@/api/mes/md/client";
import BaseInfo from '@/views/mes/md/client/components/BaseInfo' import BaseInfo from '@/views/mes/md/client/components/BaseInfo'
import UrgeEmail from '@/views/mes/md/client/components/UrgeEmail' import UrgeEmail from '@/views/mes/md/client/components/UrgeEmail'
import AddrInfo from '@/views/mes/md/client/components/AddrInfo' import AddrInfo from '@/views/mes/md/client/components/AddrInfo'
...@@ -431,6 +435,11 @@ export default { ...@@ -431,6 +435,11 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleSyncData() {
syncData().then((response) => {
this.getList()
});
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="multiple" <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="multiple"
@click="handBecomeFormalProduct">{{$t('转正式产品')}}</el-button> @click="handBecomeFormalProduct">{{$t('转正式产品')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="success" plain size="mini"
@click="handleSyncData">{{$t('ERP数据同步')}}</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">{{ $t('common.import') }}</el-button> <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">{{ $t('common.import') }}</el-button>
</el-col> </el-col>
...@@ -255,6 +259,7 @@ import { ...@@ -255,6 +259,7 @@ import {
addMdItem, addMdItem,
updateMdItem, updateMdItem,
becomeFormalProduct, becomeFormalProduct,
syncData
} from "@/api/mes/md/mdItem"; } from "@/api/mes/md/mdItem";
import BaseInfo from "./components/baseInfo.vue"; import BaseInfo from "./components/baseInfo.vue";
...@@ -395,6 +400,11 @@ export default { ...@@ -395,6 +400,11 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleSyncData() {
syncData().then((response) => {
this.getList()
});
},
getUnits() { getUnits() {
listAllUnitmeasure().then((response) => { listAllUnitmeasure().then((response) => {
this.measureOptions = response.data; this.measureOptions = response.data;
......
...@@ -87,6 +87,10 @@ ...@@ -87,6 +87,10 @@
v-hasPermi="['mes:md:vendor:remove']" v-hasPermi="['mes:md:vendor:remove']"
>{{ $t('common.del') }}</el-button> >{{ $t('common.del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="success" plain size="mini"
@click="handleSyncData">{{$t('ERP数据同步')}}</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -363,7 +367,7 @@ ...@@ -363,7 +367,7 @@
<script> <script>
import { listVendor, getVendor, delVendor, addVendor, updateVendor } from "@/api/mes/md/vendor"; import { listVendor, getVendor, delVendor, addVendor, updateVendor, syncData } from "@/api/mes/md/vendor";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import {genCode} from "@/api/system/autocode/rule" import {genCode} from "@/api/system/autocode/rule"
export default { export default {
...@@ -452,6 +456,11 @@ export default { ...@@ -452,6 +456,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleSyncData() {
syncData().then((response) => {
this.getList()
});
},
/** 查询供应商列表 */ /** 查询供应商列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -102,6 +102,10 @@ ...@@ -102,6 +102,10 @@
</el-button </el-button
> >
</el-col> --> </el-col> -->
<el-col :span="1.5">
<el-button type="success" plain size="mini"
@click="handleSyncData">{{$t('ERP数据同步')}}</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['mes:pro:workorder:export']">{{$t('导出')}}</el-button> v-hasPermi="['mes:pro:workorder:export']">{{$t('导出')}}</el-button>
...@@ -502,7 +506,8 @@ import { ...@@ -502,7 +506,8 @@ import {
dofinish, dofinish,
printInfo, printInfo,
doCheckToolNum, doCheckToolNum,
closeWorkorder closeWorkorder,
syncData
} from "@/api/mes/pro/workorder"; } from "@/api/mes/pro/workorder";
import { addProtaskList } from "@/api/mes/pro/protask"; import { addProtaskList } from "@/api/mes/pro/protask";
...@@ -694,6 +699,11 @@ export default { ...@@ -694,6 +699,11 @@ export default {
}) })
}, },
methods: { methods: {
handleSyncData() {
syncData().then((response) => {
this.getList()
});
},
//筛选日期设置默认值 //筛选日期设置默认值
setDate() { setDate() {
......
...@@ -56,6 +56,10 @@ ...@@ -56,6 +56,10 @@
v-hasPermi="['mes:wm:warehouse:remove']" v-hasPermi="['mes:wm:warehouse:remove']"
>{{ $t('common.del') }}</el-button> >{{ $t('common.del') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="success" plain size="mini"
@click="handleSyncData">{{$t('ERP数据同步')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -176,7 +180,7 @@ ...@@ -176,7 +180,7 @@
<script> <script>
import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse } from "@/api/mes/wm/warehouse"; import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse, syncData } from "@/api/mes/wm/warehouse";
import {genCode} from "@/api/system/autocode/rule" import {genCode} from "@/api/system/autocode/rule"
export default { export default {
name: "Warehouse", name: "Warehouse",
...@@ -230,6 +234,11 @@ export default { ...@@ -230,6 +234,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleSyncData() {
syncData().then((response) => {
this.getList()
});
},
/** 查询仓库设置列表 */ /** 查询仓库设置列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment