Ver Fonte

build:活动详情编辑

snow há 2 anos atrás
pai
commit
79e3ec4b54

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/0.js


+ 13 - 28
src/views/goodStore/active/components/finance-exam-two-form.vue

@@ -18,32 +18,18 @@
         label="商品名称"
         show-overflow-tooltip
       />
-      <el-table-column prop="is_activity" label="是否使用结算单价" width="220px">
-        <template slot-scope="scope">
-          <el-select v-model="scope.row.is_activity" placeholder="是否使用结算单价" size="mini">
-              <el-option value="1" label="是" />
-              <el-option value="0" label="否" />
-          </el-select>
-        </template>
-      </el-table-column>
 
-     <el-table-column prop="settle_price" label="结算单价" width="120px">
+      <el-table-column prop="is_activity" label="是否使用结算单价" width="120px">
+          <template slot-scope="scope">
+             <span>{{scope.row.is_activity === '1' ? '是' : '否'}}</span>
+          </template>
+        </el-table-column>
+
+      <el-table-column prop="settle_price" label="结算单价">
         <template slot-scope="scope">
-            <digital-input
-              :disabled="scope.row.is_activity === '0'"
-              :values="scope.row.is_activity === '0' ? '0' : scope.row.settle_price"
-              :placeholder="'结算单价'"
-              :min="0"
-              :max="100000000000"
-              :position="'right'"
-              :precision="2"
-              :size="'mini'"
-              :controls="false"
-              :append="'元'"
-              @reschange="budget_total_change($event,scope)"
-            />
-        </template>
-      </el-table-column>
+          <span>{{scope.row.settle_price}}</span>
+         </template>
+     </el-table-column>
 
       <el-table-column
         prop="activity_stock"
@@ -158,9 +144,6 @@ export default {
     this.initForm();
   },
   methods: {
-    budget_total_change(e,scope){
-      scope.row.settle_price = e + "";
-    },
     async initForm() {
       this.loading = true;
       this.resetFormData();
@@ -168,10 +151,12 @@ export default {
     },
     editRefresh(e) {
       this.showModel = false;
-      const { skuCode, activity_price } = JSON.parse(JSON.stringify(e));
+      const { skuCode, activity_price ,is_activity,settle_price} = JSON.parse(JSON.stringify(e));
       const aindex = this.tableData.findIndex((eis) => eis.skuCode === skuCode);
       if (aindex !== -1) {
         this.tableData[aindex].activity_price = activity_price;
+        this.tableData[aindex].is_activity = is_activity;
+        this.tableData[aindex].settle_price = settle_price;
         this.$set(this.tableData, aindex, this.tableData[aindex]);
       }
     },

+ 45 - 23
src/views/goodStore/active/components/set-active-price-form.vue

@@ -22,10 +22,10 @@
             :model="ruleForm"
             status-icon
             :rules="rulesThis"
-            label-width="80px"
+            label-width="130px"
             class="demo-ruleForm"
           >
-            <el-form-item label="商品编号" prop="skuCode">
+            <el-form-item label="商品编号" prop="skuCode" label-width="80px">
               <el-input
                 v-model="ruleForm.skuCode"
                 placeholder="商品编号"
@@ -33,23 +33,8 @@
                 disabled
               />
             </el-form-item>
-            <el-form-item label="商品名称" prop="good_name">
-              <el-input
-                v-model="ruleForm.good_name"
-                disabled
-                placeholder="商品名称"
-                maxlength="100"
-              />
-            </el-form-item>
-            <el-form-item label="活动库存" prop="activity_stock">
-              <el-input
-                v-model="ruleForm.activity_stock"
-                placeholder="活动库存"
-                disabled
-                maxlength="100"
-              />
-            </el-form-item>
-            <el-form-item label="起订量" prop="moq_num">
+            <div style="display:flex">
+              <el-form-item label="起订量" prop="moq_num" label-width="80px">
               <el-input
                 v-model="ruleForm.moq_num"
                 disabled
@@ -57,7 +42,7 @@
                 maxlength="100"
               />
             </el-form-item>
-            <el-form-item label="成本单价" prop="cost_price">
+            <el-form-item label="成本单价" prop="cost_price" label-width="80px">
               <el-input
                 v-model="ruleForm.cost_price"
                 disabled
@@ -67,7 +52,8 @@
                 <template slot="append">元</template></el-input
               >
             </el-form-item>
-            <el-form-item label="非活动价" prop="sale_price">
+            </div>
+            <el-form-item label="非活动价" prop="sale_price" label-width="80px">
               <el-input
                 v-model="ruleForm.sale_price"
                 disabled
@@ -77,7 +63,35 @@
                 <template slot="append">元</template></el-input
               >
             </el-form-item>
-            <el-form-item label="活动价" prop="activity_price">
+            <el-form-item label="是否使用结算单价" prop="is_activity">
+              <el-select
+                v-model="ruleForm.is_activity"
+                style="width:100%"
+                placeholder="是否使用活动单价"
+                maxlength="100"
+              >
+              <el-option value="0" label="否" />
+              <el-option value="1" label="是" />
+            </el-select>
+            </el-form-item>
+
+            <el-form-item label="结算单价" prop="settle_price" label-width="80px">
+              <digital-input
+              :disabled="ruleForm.is_activity === '0'"
+              :values="ruleForm.is_activity === '0' ? '0' : ruleForm.settle_price"
+              :placeholder="'结算单价'"
+              :min="0"
+              :max="100000000000"
+              :position="'right'"
+              :precision="2"
+              :size="'large'"
+              :controls="false"
+              :append="'元'"
+              @reschange="budget_total_change"
+            />
+            </el-form-item>
+
+            <el-form-item label="活动价" prop="activity_price" label-width="80px">
               <digital-input
                 :values="ruleForm.activity_price"
                 :placeholder="'活动价'"
@@ -128,6 +142,8 @@ export default {
         cost_price: "",
         sale_price: "",
         activity_price: "",
+        is_activity:'1',
+        settle_price:''
       },
       rulesThis: this.rules,
       rules: {
@@ -155,6 +171,9 @@ export default {
     },
   },
   methods: {
+    budget_total_change(e){
+      this.ruleForm.settle_price = e + ''
+    },
     async initForm() {
       this.loading = true;
       this.rulesThis = this.rules;
@@ -194,7 +213,10 @@ export default {
             let model = JSON.parse(JSON.stringify(this.ruleForm));
             this.showModelThis = false;
             // 刷新
-            this.$emit("refresh", model);
+            this.$emit("refresh", {
+              ...model,
+              settle_price:this.ruleForm.is_activity === '0' ? '0' : this.ruleForm.settle_price
+            });
           }
         } else {
           console.log("error submit!!");

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff