zhangyuewww 3 年之前
父节点
当前提交
688870a17b
共有 1 个文件被更改,包括 19 次插入4 次删除
  1. 19 4
      src/views/contractManagement/purchaseContractAdd.vue

+ 19 - 4
src/views/contractManagement/purchaseContractAdd.vue

@@ -29,7 +29,7 @@
       </div>
       <ws-info-table>
         <!--合同类型-->
-        <ws-form-item
+        <!-- <ws-form-item
           label="合同类型"
           span="1"
           prop="agreementType"
@@ -47,12 +47,20 @@
               :value="item.constValue"
             />
           </ws-select>
+        </ws-form-item> -->
+        <ws-form-item label="合同类型" span="1" prop="agreementType" class="readonly">
+          <el-radio v-model="deptBudgetList.agreementType" label="采购合同" 
+            >采购合同</el-radio
+          >
+          <el-radio v-model="deptBudgetList.agreementType" label="补充协议"
+            >补充协议</el-radio
+          >
         </ws-form-item>
         <!--合同编号-->
         <ws-form-item
           label="合同编号"
           span="1"
-          v-if="deptBudgetList.agreementType == '采购合同'"
+          v-show="deptBudgetList.agreementType == '采购合同'"
           prop="contractNo"
           class="readonly"
           required
@@ -69,7 +77,7 @@
           prop="contractNo"
           label="关联合同"
           span="1"
-          v-if="deptBudgetList.agreementType == '补充协议'"
+          v-show="deptBudgetList.agreementType =='补充协议'"
         >
           <ws-select
             v-model="deptBudgetList.contractNo"
@@ -690,6 +698,7 @@ export default {
       agreementType:'',
       deptBudgetList: {
         deliverType: '1',
+        agreementType:'采购合同',
         addressUrl:'',
         finalTradingVolume: 0,
         totalContractPrice:0,
@@ -861,6 +870,11 @@ export default {
     selectRelation(e){
         // this.deptBudgetList.agreementNo = e
         this.$set(this.deptBudgetList,'agreementNo',e)
+        for (var i = 0; i < this.contractNoList.length; i++) {
+        if (this.contractNoList[i].contractNo == val) {
+            this.deptBudgetList = this.contractNoList[i]
+        }
+      }
     },
     onChange() {
      this.$refs.upload
@@ -1438,7 +1452,7 @@ export default {
         return
       }
       this.$refs.deptBudgetList.validate((valid) => {
-        if (!valid) {
+        if (valid) {
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 2
           this.deptBudgetList.goodsType = 1
@@ -1448,6 +1462,7 @@ export default {
               this.$message.success('添加成功')
               this.deptBudgetList = {
                 deliverType: '1',
+                agreementType:'采购合同',
                 finalTradingVolume: 0,
                 totalContractPrice:0,
                 contractGoodsInfo: {