浏览代码

返利代金券支出修改

qymljy 2 年之前
父节点
当前提交
50984958e9
共有 2 个文件被更改,包括 33 次插入21 次删除
  1. 19 8
      src/Form/cashcouponPay/add.vue
  2. 14 13
      src/Form/cashcouponPay/edit.vue

+ 19 - 8
src/Form/cashcouponPay/add.vue

@@ -74,9 +74,9 @@
                 <el-select v-model="form.subclass" placeholder="请选择分类明细" style="width: 100%">
                   <el-option
                       v-for="item in subClassData"
-                      :key="item"
-                      :label="item"
-                      :value="item">
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -84,6 +84,7 @@
             <el-col :span="12">
               <el-form-item label="单据日期:" prop="billdate">
                 <el-date-picker
+                    style="width: 100%"
                     v-model="form.billdate"
                     format="yyyy-MM-dd"
                     value-format="yyyy-MM-dd"
@@ -132,6 +133,13 @@
                         <span style="margin-left: 10px">{{ scope.row.subclass?scope.row.subclass:'--' }}</span>
                       </template>
                     </el-table-column>
+                    <el-table-column
+                        label="单据时间"
+                    >
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.billdate?scope.row.billdate:'--' }}</span>
+                      </template>
+                    </el-table-column>
                   </el-table>
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
@@ -150,7 +158,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="金额:" prop="amount">
+              <el-form-item label="支出金额:" prop="amount">
                 <el-input v-model="form.amount" placeholder="请输入金额" type="number"></el-input>
               </el-form-item>
             </el-col>
@@ -275,6 +283,9 @@ export default {
             "sa_cashbillid_rebate": '', //所选的代金券id
             "sa_cashbillid_billno":""
           }
+          this.$store.dispatch('changeDetailDrawer',true)
+          this.$router.push({path:'/cashcouponPayDetail',query:{id:res.data.sa_cashbillid,rowindex:res.data.rowindex}})
+
         })
       })
     },
@@ -287,15 +298,15 @@ export default {
     },
     /*获取分类明细*/
     subClassList(){
-      this.$store.dispatch('optiontypeselect','rebatebillpaytype').then(res=>{
+      this.$store.dispatch('optiontypeselect','rebatepaytype').then(res=>{
         console.log(res,'分类明细')
-        let index = ''
+        /*let index = ''
         for (var i = 0 ;i<res.data.length; i++){
           if (res.data[i].value === '返利金'){
             index = i
           }
-        }
-        this.subClassData = res.data[index].subvalues
+        }*/
+        this.subClassData = res.data
       })
     },
     /*获取企业*/

+ 14 - 13
src/Form/cashcouponPay/edit.vue

@@ -74,9 +74,9 @@
                 <el-select v-model="form.subclass" placeholder="请选择分类明细" style="width: 100%">
                   <el-option
                       v-for="item in subClassData"
-                      :key="item"
-                      :label="item"
-                      :value="item">
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -84,6 +84,7 @@
             <el-col :span="12">
               <el-form-item label="单据日期:" prop="billdate">
                 <el-date-picker
+                    style="width: 100%"
                     v-model="form.billdate"
                     format="yyyy-MM-dd"
                     value-format="yyyy-MM-dd"
@@ -132,6 +133,13 @@
                         <span style="margin-left: 10px">{{ scope.row.subclass?scope.row.subclass:'--' }}</span>
                       </template>
                     </el-table-column>
+                    <el-table-column
+                        label="单据时间"
+                    >
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.billdate?scope.row.billdate:'--' }}</span>
+                      </template>
+                    </el-table-column>
                   </el-table>
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
@@ -150,7 +158,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="金额:" prop="amount">
+              <el-form-item label="支出金额:" prop="amount">
                 <el-input v-model="form.amount" placeholder="请输入金额" type="number"></el-input>
               </el-form-item>
             </el-col>
@@ -286,15 +294,8 @@ export default {
     },
     /*获取分类明细*/
     subClassList(){
-      this.$store.dispatch('optiontypeselect','rebatebillpaytype').then(res=>{
-        console.log(res,'分类明细')
-        let index = ''
-        for (var i = 0 ;i<res.data.length; i++){
-          if (res.data[i].value === '返利金'){
-            index = i
-          }
-        }
-        this.subClassData = res.data[index].subvalues
+      this.$store.dispatch('optiontypeselect','rebatepaytype').then(res=>{
+        this.subClassData = res.data
       })
     },
     /*获取企业*/