feat(物料管理): 同步小型刀具库数据

This commit is contained in:
Kelvin 2024-12-13 14:28:40 +08:00
parent cf8ef55f8f
commit 2a5cd84833
2 changed files with 53 additions and 28 deletions

View File

@ -42,3 +42,11 @@ export function delMdItem(itemId) {
method: 'delete'
})
}
// 同步小型刀具库数据
export function asyncSmallKnifeData() {
return request({
url: '/mes/md/mditem/asyncSmallKnife',
method: 'get'
})
}

View File

@ -89,6 +89,16 @@
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
@click="asyncSmallKnifeData"
>同步小型刀具库
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
@ -453,7 +463,7 @@
</template>
<script>
import {addMdItem, delMdItem, getMdItem, listMdItem, updateMdItem} from "@/api/mes/md/mdItem";
import {addMdItem, asyncSmallKnifeData, delMdItem, getMdItem, listMdItem, updateMdItem} from "@/api/mes/md/mdItem";
import ItemBom from "./components/itembom.vue";
import SOPTab from "./components/sop.vue"
@ -717,6 +727,13 @@ export default {
this.getBarcodeUrl();
});
},
asyncSmallKnifeData() {
asyncSmallKnifeData().then(res => {
console.log(res);
this.$message.success(`同步成功,新增数据 ${res.data}`);
this.getList();
})
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {