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"-->
@ -210,15 +220,15 @@
<el-input v-model="form.itemCode" placeholder="请输入物料编码" maxlength="64" v-else/>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label-width="80">-->
<!-- <el-switch v-model="autoGenFlag"-->
<!-- active-color="#13ce66"-->
<!-- active-text="自动生成"-->
<!-- @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">-->
<!-- </el-switch>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label-width="80">-->
<!-- <el-switch v-model="autoGenFlag"-->
<!-- active-color="#13ce66"-->
<!-- active-text="自动生成"-->
<!-- @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">-->
<!-- </el-switch>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="24">
@ -247,15 +257,15 @@
</el-col>
</el-row>
</el-col>
<!-- <el-col :span="10">-->
<!-- <div class="flex-container">-->
<!-- <el-image class="barcodeClass" fit="scale-down" :src="form.barcodeUrl">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"></i>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="10">-->
<!-- <div class="flex-container">-->
<!-- <el-image class="barcodeClass" fit="scale-down" :src="form.barcodeUrl">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"></i>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -291,15 +301,15 @@
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="标准数量" prop="standardNumber">-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1" disabled-->
<!-- v-if="optType=='view'"/>-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1"-->
<!-- placeholder="请输入标准数量"-->
<!-- v-else/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="标准数量" prop="standardNumber">-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1" disabled-->
<!-- v-if="optType=='view'"/>-->
<!-- <el-input-number v-model="form.standardNumber" :min="0" :percision="0" :step="1"-->
<!-- placeholder="请输入标准数量"-->
<!-- v-else/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12" v-if="resentEnable">
<el-form-item label="刀刃数" prop="attr1">
<el-input-number v-model="form.attr1" :min="1" :percision="0" :step="1" disabled
@ -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 => {