瀏覽代碼

采购类型单选修改

wangqiang 2 年之前
父節點
當前提交
5b3f894e0d

+ 5 - 4
src/views/modules/materialManagement/info/MaterialTypePullForm.vue

@@ -38,7 +38,8 @@
           :tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40" ></vxe-column>
+<!--          <vxe-column type="checkbox" width="40" ></vxe-column>-->
+          <vxe-column type="radio" width="40" ></vxe-column>
           <vxe-column title="报销内容名称" field="name" align="left" tree-node></vxe-column>
           <vxe-column width="100" title="序号" field="sort"></vxe-column>
         </vxe-table>
@@ -89,12 +90,12 @@
       // 表单提交
       getProgramForType () {
         let rows
-        if (this.commonJS.isEmpty(this.$refs.typeTable.getCheckboxRecords()) || this.$refs.typeTable.getCheckboxRecords().length > 1) {
+        if (this.commonJS.isEmpty(this.$refs.typeTable.getRadioRecord())) {
           this.$message.error('请选择一条数据')
           return
         }
-        rows = this.$refs.typeTable.getCheckboxRecords()
-        if (rows[0].level !== '3' && rows[0].id !== '3') {
+        rows = this.$refs.typeTable.getRadioRecord()
+        if (rows.level !== '3') {
           this.$message.error('请选择子集数据')
           return
         }

+ 2 - 2
src/views/modules/materialManagement/purchase/PurchaseForm.vue

@@ -674,8 +674,8 @@
         this.$refs.materialTypePullForm.init()
       },
       getProgramForType (rows) {
-        this.inputForm.detailInfos[this.indexRow].typeId = rows[0].id
-        this.inputForm.detailInfos[this.indexRow].procurementType = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].typeId = rows.id
+        this.inputForm.detailInfos[this.indexRow].procurementType = rows.name
         this.indexRow = ''
         this.$forceUpdate()
       },