Ver código fonte

'合同提交'

zhujun 2 anos atrás
pai
commit
89f865d5d9

+ 11 - 1
src/views/contractManage/contractBook/components/addDialog.vue

@@ -64,6 +64,7 @@
                   v-model="form.categoryId"
                   valueKey="id"
                   labelKey="name"
+                  @change="treeChange"
                   placeholder="请选择"
                   default-expand-all
                 />
@@ -448,6 +449,9 @@ export default {
           receiptPaymentType:[
             { required: true, message: '请选择收付款类型', trigger: 'change' }
           ],
+          categoryId:[
+          { required: true, message: '请选择合同分类', trigger: 'change' }
+          ],
           contractNumber:[
             { required: true, message: '请输入自带编号', trigger: 'change' }
           ],
@@ -547,7 +551,7 @@ export default {
           this.$nextTick(()=>{
             let {contractVO}=data
             this.form = contractVO;
-            this.$refs.inventoryTable&&this.$refs.inventoryTable.putTableValue(data.productList)
+            this.$refs.inventoryTable&&this.$refs.inventoryTable.putTableValue(data)
             this.$refs.paymentListTable&&this.$refs.paymentListTable.putTableValue(data.receiptPaymentList)
             this.getLinkInfo(data.type=='2'?contractVO.partbId:contractVO.partaId)
           })
@@ -594,6 +598,12 @@ export default {
           categoryId:''
       })
     },
+    //选择合同分类
+    treeChange(val){
+      //这里eladmin组件有bug,要手动验证下
+   this.$set(this.form, 'categoryId',  val)
+   this.$refs.form.validateField('categoryId');
+    },
     //选择下拉框
     onchangeLink(selectedOptions){
       if(this.form.type=='2'){

+ 3 - 2
src/views/contractManage/contractBook/components/detailDialog.vue

@@ -196,7 +196,7 @@
           <template v-slot:toolbar>
         <div class="headbox">
         <span class="amount">总计:{{form.totalPrice}}元</span>
-       
+        <span class="amount">优惠总金额:{{form.discountTotalPrice}}元</span>
       </div>
       </template>
           <template v-slot:technicalDrawings="{ row }">
@@ -460,11 +460,12 @@
 
   .headbox{
   display: flex;
-  justify-content: space-between;
+  justify-content: flex-start;
   align-items: center;
   .amount{
     font-size: 14px;
     font-weight: bold;
+    margin-right: 20px;
   }
 }
   </style>

+ 4 - 3
src/views/contractManage/contractBook/components/inventoryTable.vue

@@ -365,9 +365,10 @@ export default {
     },
       //修改回显
       putTableValue(data){
-        if(data&&data?.length){
-            this.form.datasource=data
-            this.getTotalPrice()
+        if(data&&data?.productList){
+            this.form.datasource=data.productList
+            this.allPrice=data.contractVO.totalPrice
+            this.discountTotalPrice=data.contractVO.discountTotalPrice
         }
       },
     //选择产品