制造成本分析修改

This commit is contained in:
2026-03-25 14:10:27 +08:00
parent bb66f97b95
commit 4f7466bb29
59 changed files with 3909 additions and 1779 deletions

View File

@@ -7,10 +7,21 @@
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="total" @pagination="getDataList" :background="true" />
<!-- 新增 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="centervisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<product-info-add ref="prodectInfo" @successSubmit="successSubmit" />
</base-dialog>
</div>
</template>
<script>
import ProductInfoAdd from './components/productInfoAdd.vue';
const tableProps = [
{
prop: 'name',
@@ -27,6 +38,7 @@ const tableProps = [
];
export default {
name: 'ProductInfoConfiguration',
components:{ProductInfoAdd},
data () {
return {
formConfig: [
@@ -69,19 +81,66 @@ export default {
type: 'delete',
btnName: '删除',
},
]
],
addOrEditTitle: '',
centervisible: false,
}
},
methods: {
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.getList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.$nextTick(() => {
this.$refs.prodectInfo.init();
});
this.centervisible = true;
break;
}
},
getDataList() {
},
handleClick() {}
handleClick(val) {
switch (val.type) {
case 'edit':
this.addOrEditTitle = '编辑';
this.$nextTick(() => {
this.$refs.prodectInfo.init(val.data.id);
});
this.centervisible = true;
break;
default:
this.handleDelete(val.data);
}
},
handleCancel() {
this.$refs.prodectInfo.formClear();
this.centervisible = false;
this.addOrEditTitle = '';
},
handleConfirm() {
this.$refs.prodectInfo.submitForm();
},
successSubmit() {
this.handleCancel();
this.getList();
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('确定删除产品"' + row.name + '吗?').then(function() {
deleteModel(row.id).then(response => {
that.getList();
that.$modal.msgSuccess("删除成功");
})
}).catch(() => {});
}
}
}
</script>