|
|
@@ -0,0 +1,84 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-button size="mini" type="primary" style="margin-bottom:16px" @click="editBtn">一键调价</el-button>
|
|
|
+ <el-dialog title="调整商品等级价格" append-to-body :visible.sync="dialogFormVisible" width="400px">
|
|
|
+ <div class="container">
|
|
|
+ <el-row>
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="right" size="mini">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="一级价格" prop="price">
|
|
|
+ <el-input size="mini" placeholder="请输入价格" v-model="form.itempriceadjust[0].price"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "add",
|
|
|
+ props:['data'],
|
|
|
+ components:{},
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ dialogFormVisible:false,
|
|
|
+ projectAddress:[],
|
|
|
+ form:{
|
|
|
+ "itemid": '',
|
|
|
+ "itempriceadjust": [
|
|
|
+ {
|
|
|
+ "pricegrade":'1',
|
|
|
+ "price":''
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ rules:{
|
|
|
+ price:[
|
|
|
+ { required: true, message: '请输入价格', trigger: 'blur'},
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ editBtn () {
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ console.log(this.data[0].price);
|
|
|
+ this.form.itempriceadjust[0].price = this.data[0].price
|
|
|
+ },
|
|
|
+ onSubmit(){
|
|
|
+ this.$refs['form'].validate(async (valid) => {
|
|
|
+ if (!valid) return false
|
|
|
+ this.form.itemid = this.$route.query.id
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20230404104604",
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ this.$refs['form'].resetFields();
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+/deep/.el-select {
|
|
|
+ height: 28px !important;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+/deep/.el-input__inner {
|
|
|
+ height: 28px !important;
|
|
|
+}
|
|
|
+</style>
|