|
@@ -13,24 +13,26 @@
|
|
|
@clickReset="clickReset">
|
|
|
</byTable>
|
|
|
<div style="margin-bottom: 10px; display: flex">
|
|
|
- <div style="height: 30px; line-height: 30px; margin-right: 10px">
|
|
|
+ <div style="height: 32px; line-height: 32px; margin-right: 10px">
|
|
|
<el-button type="primary" @click="handleBOM()" v-preReClick>选择bom</el-button>
|
|
|
</div>
|
|
|
- <div style="height: 30px; line-height: 30px; margin-right: 10px">
|
|
|
+ <div style="height: 32px; line-height: 32px; margin-right: 10px">
|
|
|
<el-button type="primary" @click="handleReset" text>重置</el-button>
|
|
|
</div>
|
|
|
- <div style="height: 30px; line-height: 30px; margin-right: 10px">
|
|
|
+ <div style="height: 32px; line-height: 32px; margin-right: 10px">
|
|
|
<el-button type="primary" @click="handleReplace" text>一键替换</el-button>
|
|
|
</div>
|
|
|
+ <el-form :model="formData.data" label-width="100px" ref="bomSpecCode">
|
|
|
+ <el-form-item label="BOM品号" prop="bomSpecCode" :rules="[{ required: true, message: '请输入BOM品号', trigger: 'blur' }]">
|
|
|
+ <el-input v-model="formData.data.bomSpecCode" placeholder="请输入BOM品号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div style="height: 32px; line-height: 32px; margin-left: 10px">
|
|
|
+ <el-button type="primary" @click="oneClickDelete" text>一键删除</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
- <el-table
|
|
|
- :data="selectData"
|
|
|
- :cell-style="{ padding: '0' }"
|
|
|
- :row-style="{ height: '35px' }"
|
|
|
- header-row-class-name="tableHeader"
|
|
|
- style="margin-bottom: 10px"
|
|
|
- v-loading="loading">
|
|
|
+ <el-table :data="selectData" :cell-style="{ padding: '0' }" :row-style="{ height: '35px' }" header-row-class-name="tableHeader" style="margin-bottom: 10px">
|
|
|
<el-table-column label="品号" prop="code" width="220" />
|
|
|
<el-table-column label="品名" prop="name" min-width="220" />
|
|
|
<el-table-column label="操作" align="center" width="120">
|
|
@@ -41,7 +43,7 @@
|
|
|
</el-table>
|
|
|
<br />
|
|
|
|
|
|
- <el-table :data="sourceList.data" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
|
|
|
+ <el-table :data="sourceList.data" :row-style="{ height: '35px' }" header-row-class-name="tableHeader" v-loading="loading">
|
|
|
<el-table-column label="群组品号" prop="skuCode" width="120" />
|
|
|
<el-table-column label="SKU品号" prop="skuSpecCode" width="140" />
|
|
|
<el-table-column label="品名" prop="skuSpecName" min-width="240" />
|
|
@@ -199,6 +201,30 @@ const handleReplace = () => {
|
|
|
return ElMessage("请选择BOM");
|
|
|
}
|
|
|
};
|
|
|
+const formData = reactive({
|
|
|
+ data: {
|
|
|
+ bomSpecCode: "",
|
|
|
+ },
|
|
|
+});
|
|
|
+const oneClickDelete = () => {
|
|
|
+ proxy.$refs.bomSpecCode.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ ElMessageBox.confirm("是否确认一键删除包材", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ proxy.post("/sku/removePackagingMaterial", formData.data).then(() => {
|
|
|
+ ElMessage({ message: "一键删除成功", type: "success" });
|
|
|
+ proxy.$refs.bomSpecCode.resetFields();
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|