浏览代码

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 年之前
父节点
当前提交
6a69cfb8cf

+ 16 - 4
src/HDrpManagement/invoiceapp/detail/tab/blueInvoice/components/editmx.vue

@@ -2,9 +2,9 @@
   <div>
     <el-button :disabled="status !== '新建'" size="small" type="text" @click="onShow">修 改</el-button>
     <el-dialog title="修改明细信息" :visible.sync="dialogFormVisible" append-to-body width="400px">
-      <el-form :model="form" size="small" label-position="right" label-width="90px">
+      <el-form :model="form" size="small" :rules="rules" ref="form" label-position="right" label-width="90px">
         <el-form-item label="含税金额">
-          <el-input v-model="form.invoiceamount" autocomplete="off"></el-input>
+          <el-input v-model="form.invoiceamount" disabled autocomplete="off"></el-input>
         </el-form-item>
         <el-form-item label="含税单价">
           <el-input v-model="form.price" autocomplete="off"></el-input>
@@ -30,7 +30,18 @@ export default {
   data () {
     return {
       dialogFormVisible:false,
-      form:{}
+      form:{},
+      rules: {
+        price: [
+          { required: true, message: '含税单价不能为空', trigger: 'blur' }
+        ],
+        invoiceaqty: [
+          { required: true, message: '数量不能为空', trigger: 'blur' }
+        ],
+        taxrate: [
+          { required: true, message: '税率不能为空', trigger: 'blur' }
+        ],
+      }
     }
   },
   methods:{
@@ -44,7 +55,8 @@ export default {
         "spec": this.data.spec,
         "price": this.data.price, 
         "invoiceaqty": this.data.num, 
-        "invoiceamount": this.data.invoiceamount
+        "invoiceamount": this.data.price * this.data.num,
+        "taxrate":this.data.taxrate
       }
       this.dialogFormVisible = true
     }

+ 4 - 2
src/HDrpManagement/invoiceapp/detail/tab/blueInvoice/components/invoiceTable.vue

@@ -81,8 +81,10 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
-      this.activeRow(res.data[0])
-      this.$refs.table.setCurrentRow(this.list[0])
+      if (res.data.length > 0) {
+        this.activeRow(res.data[0])
+        this.$refs.table.setCurrentRow(this.list[0])
+      }
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

+ 1 - 1
src/HDrpManagement/invoiceapp/detail/tab/blueInvoice/components/invoiceTablemx.vue

@@ -25,7 +25,7 @@
         label="规格型号">
       </el-table-column>
       <el-table-column
-        prop="invoiceno"
+        prop="unit"
         label="单位">
       </el-table-column>
       <el-table-column

+ 3 - 9
src/HDrpManagement/publicCustomer/modules/detail.vue

@@ -8,7 +8,6 @@
         :mainAreaData="mainAreaData"
         :turnPageId="20221011133602"
         idname="sa_customersid"
-        tags=""
         :tabs="['详细信息','联系人信息','客户地址']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
@@ -131,17 +130,17 @@ export default {
         }
       })
       this.tagObj = res.data
-      console.log(this.tagObj);
       
     },
     async queryMainData (id) {
+     
       const res = await this.$api.requested({
         "id": "20221012164302",
         "content": {
-            "sa_customersid":id
+          "sa_customersid":id
         }
       })
-      this.$refs.details.param.content.where.sa_customerpoolid = this.$route.query.tabIndex
+       this.$refs.details.param.content.where.sa_customerpoolid = this.$route.query.tabIndex
       this.$refs.details.param.content.isExport = false
       this.mainData = res.data
       this.length = this.mainData.leader.length
@@ -240,10 +239,6 @@ export default {
         }
       ]
     },
-    show(){
-      this.visible = false
-      this.$emit('onSuccess')
-    },
     onSuccess(){
       this.visible = false
       /*this.queryMainData(this.$route.query.id)*/
@@ -258,7 +253,6 @@ export default {
   },
   created () {
     // 验证权限
-    this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
     this.queryMainData(this.$route.query.id)
     this.getSysOption()
     this.query_arealist()

+ 3 - 1
src/components/normal-basic-layout/details/modules/tabs/tab.vue

@@ -66,7 +66,9 @@ export default {
   },
   watch: {
     tabs () {
-      if (!this.tabs) return this.activeName = 'file'
+      if (!this.tabs) {this.activeName = 'file'} else {
+        this.activeName = 'tab0'
+      }
     },
     activeName (val) {
       val === 'file'?this.queryAttments():''