codeMan 2 年之前
父節點
當前提交
4111d09854

+ 1 - 1
src/HDrpManagement/ProductMag/detail/index.vue

@@ -96,7 +96,7 @@
         </productGroup>
       </div>
       <div slot="slot3">
-        <productPrice></productPrice>
+        <productPrice :data="mainData"></productPrice>
       </div>
     </basicDetails>
   </div>

+ 1 - 0
src/HDrpManagement/ProductMag/index.vue

@@ -17,6 +17,7 @@
       :detailPath="{
         path:'/productmagDetail'
       }"
+      :isExport="false"
       >
       <template #titleRight>
         <to_examine v-if="tool.checkAuth($route.name,'toExamine')" class="inline-16" style="margin-left: 10px" :rowData="rowData" @examineSuccess="onSuccess" :disabled="rowData.length === 0"></to_examine>

+ 84 - 0
src/HDrpManagement/ProductMag/modules/editPrice.vue

@@ -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>

+ 4 - 0
src/HDrpManagement/ProductMag/modules/productPrice.vue

@@ -1,5 +1,6 @@
 <template>
   <div>
+    <editPrice v-if="tool.checkAuth($route.name,'editPrice')" :data="list" @onSuccess="listData()"></editPrice>
     <tableLayout :layout="tablecols" :data="list" :custom="true" height="300px" >
       <template v-slot:customcol="scope">
         <p >{{scope.column.data[scope.column.columnname]}}</p>
@@ -9,8 +10,11 @@
 </template>
 
 <script>
+import editPrice from './editPrice'
 export default {
+  props:['data'],
   name: "productPrice",
+  components:{editPrice},
   data(){
     return {
       tablecols:[],

+ 2 - 2
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -652,7 +652,7 @@ export default {
           "type": this.data.type, //订单类型
           "items": this.tableData
         })
-      },500)
+      },1000)
     },
     onDateChange (val){
       let that = this
@@ -671,7 +671,7 @@ export default {
       })
        if (res.code == 1) {
         this.$emit('onSuccess')
-        this.listData()
+        // this.listData()
       } else {
         this.$message({
           message:res.data + ':' + res.msg,