Commit 935aaf85 authored by chenzj's avatar chenzj

新物料分类接口

parent ca362304
......@@ -58,4 +58,14 @@ export function delItemType(itemTypeId) {
url: '/mes/md/itemtype/' + itemTypeId,
method: 'delete'
})
}
\ No newline at end of file
}
export function synItemType() {
return request({
url: '/mes/md/itemtype/sapSynchro',
method: 'post'
})
}
......@@ -35,6 +35,15 @@
@click="toggleExpandAll"
>展开/折叠</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-refresh"
size="mini"
@click="handleSynchronism"
v-hasPermi="['mes:md:mditem:edit']"
>同步</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -149,7 +158,7 @@
</template>
<script>
import { listItemType, getItemType, delItemType, addItemType, updateItemType, listItemTypeExcludeChild } from "@/api/mes/md/itemtype";
import { listItemType, getItemType, delItemType, addItemType, updateItemType, listItemTypeExcludeChild ,synItemType} from "@/api/mes/md/itemtype";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
......@@ -279,7 +288,7 @@ export default {
handleUpdate(row) {
this.reset();
getItemType(row.itemTypeId).then(response => {
this.form = response.data;
this.form = response.data;
this.open = true;
this.title = "修改分类";
});
......@@ -287,6 +296,15 @@ export default {
this.itemTypeOptions = this.handleTree(response.data, "itemTypeId","parentTypeId");
});
},
/** 同步SAP */
handleSynchronism() {
this.reset();
synItemType().then(res => {
if(res.code === 200) {
this.getList();
}
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
......
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