更新
This commit is contained in:
84
src/views/product/components/adjust.vue
Normal file
84
src/views/product/components/adjust.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="调价"
|
||||
:visible="controlWindows.adjust"
|
||||
width="30%"
|
||||
:before-close="closeWindow"
|
||||
@opened="openDrawer"
|
||||
>
|
||||
<div class="adjust">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
<el-form-item label="成本价" prop="floorPrice">
|
||||
<el-input
|
||||
maxlength="50"
|
||||
v-checkNum
|
||||
v-model="form.floorPrice"
|
||||
placeholder="请输入成本价"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业销售价" prop="salePrice2company">
|
||||
<el-input
|
||||
maxlength="50"
|
||||
v-checkNum
|
||||
v-model="form.salePrice2company"
|
||||
placeholder="请输入企业销售价"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="controlWindows.adjust = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from "api/product.js";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
controlWindows: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
rules: {
|
||||
floorPrice: [
|
||||
{ required: true, message: "请输入成本价", trigger: "blur" },
|
||||
],
|
||||
salePrice2company: [
|
||||
{ required: true, message: "请选择修改状态", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDrawer() {},
|
||||
submit() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
Object.assign(this.form, this.controlWindows.addInfo);
|
||||
serve.modifyPrice(this.form).then((res) => {
|
||||
this.$message.success(res.msg);
|
||||
this.closeWindow();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
closeWindow() {
|
||||
this.form = {};
|
||||
this.$emit("closeWindow");
|
||||
this.controlWindows.adjust = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.adjust {
|
||||
.el-input {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user