Forráskód Böngészése

预算批复管理
预算费用管理 页面调整

xieyn 2 éve
szülő
commit
ad37ec53e3

+ 5 - 16
src/views/oa/BudgetCostList.vue

@@ -188,9 +188,6 @@
             key:'rowIndex',
             width:60,
             align:"center",
-            // customRender:function (t,r,index) {
-            //   return parseInt(index)+1;
-            // }
             customRender: (value, row, index) => {
               const obj = {
                 children: parseInt(index)+1,
@@ -257,16 +254,16 @@
             }
           },
           {
-            title: '费用资金类别',
+            title: '部门',
             align:"center",
             width:150,
-            dataIndex: 'costFundType',
+            dataIndex: 'department_dictText',
           },
           {
-            title: '预算资金类别',
+            title: '费用资金类别',
             align:"center",
             width:150,
-            dataIndex: 'budgetFundType',
+            dataIndex: 'costFundType',
           },
           {
             title: '预算资金名称',
@@ -315,17 +312,9 @@
             title:'备注',
             align:"center",
             width:200,
-            dataIndex: 'remark',
+            dataIndex: 'detailRemark',
             ellipsis:true,
             customRender: (l) => ellipsis(l)
-            // customRender: (value, row, index) => {
-            //   const obj = {
-            //     children: value,
-            //     attrs: {},
-            //   };
-            //   obj.attrs.rowSpan = this.myArray[index];
-            //   return obj
-            // }
           },
           {
             title: '操作',

+ 62 - 9
src/views/oa/modules/BudgetCostModal.vue

@@ -65,7 +65,11 @@
             :maxHeight="300"
             :rowNumber="true"
             :rowSelection="true"
-            :actionButton="true"/>
+            :actionButton="true">
+          <template v-slot:department="props">
+            <j-select-depart  @change="departChange(props)" v-model="props.text" :trigger-change="true"></j-select-depart>
+          </template>
+          </j-editable-table>
         </a-tab-pane>
 
       </a-tabs>
@@ -82,12 +86,14 @@
   import { validateDuplicateValue } from '@/utils/util'
   import JDate from '@/components/jeecg/JDate'
   import JYearPicker from '@/components/date/YearSelect'
+  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
   export default {
     name: 'BudgetCostModal',
     mixins: [JEditableTableMixin],
     components: {
       JDate,
-      JYearPicker
+      JYearPicker,
+      JSelectDepart
     },
     data() {
       return {
@@ -130,28 +136,59 @@
           dataSource: [],
           columns: [
             {
-              title: '费用资金类别',
-              key: 'costFundType',
-              type: FormTypes.input,
+              title: '部门',
+              key: 'department',
+              type: FormTypes.slot,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              slotName: 'department',
             },
             {
-              title: '预算资金类别',
-              key: 'budgetFundType',
-              type: FormTypes.input,
+              title: '费用资金类别',
+              key: 'costFundType',
+              type: FormTypes.select,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              options:[{
+                value: "1",
+                text: "1"
+              },{
+                value: "2",
+                text: "2"
+              },
+                {
+                  value: "3",
+                  text: "3"
+                }]
             },
             {
               title: '预算资金名称',
               key: 'budgetFundName',
-              type: FormTypes.input,
+              type: FormTypes.select,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              options:[{
+                value: "差旅费",
+                text: "差旅费"
+              },{
+                value: "招待费",
+                text: "招待费"
+              },
+                {
+                  value: "车辆使用费",
+                  text: "车辆使用费"
+                },
+                {
+                  value: "会务费",
+                  text: "会务费"
+                },
+                {
+                  value: "办公费",
+                  text: "办公费"
+                }]
             },
             {
               title: '预算资金构成',
@@ -168,6 +205,7 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              validateRules: [{ pattern: "money", message: "${title}格式不正确" }],
             },
             {
               title: '合同金额',
@@ -176,6 +214,7 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              validateRules: [{ pattern: "money", message: "${title}格式不正确" }],
             },
             {
               title: '已支付金额',
@@ -184,6 +223,7 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              validateRules: [{ pattern: "money", message: "${title}格式不正确" }],
             },
             {
               title: '待支付金额',
@@ -192,6 +232,7 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              validateRules: [{ pattern: "money", message: "${title}格式不正确" }],
             },
             {
               title: '附件上传',
@@ -271,6 +312,18 @@
           });
         });
       },
+      //部门插槽更改数据
+      departChange(props) {
+        let values = [
+          {
+            rowKey: props.rowId,
+            values: {
+              'department': props.text,
+            },
+          },
+        ]
+        this.$refs.budgetCostDetail.setValues(values)
+      }
     }
   }
 </script>

+ 57 - 15
src/views/oa/modules/BudgetReplyModal.vue

@@ -52,7 +52,7 @@
             </a-form-item>
           </a-col>
           <a-col :span="24">
-            <a-form-item label="附件" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-item label="附件" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
               <j-upload v-decorator="['file', validatorRules.file]" :trigger-change="true"></j-upload>
             </a-form-item>
           </a-col>
@@ -71,7 +71,11 @@
             :maxHeight="300"
             :rowNumber="true"
             :rowSelection="true"
-            :actionButton="true"/>
+            :actionButton="true">
+          <template v-slot:department="props">
+            <j-select-depart  @change="departChange(props)" v-model="props.text" :trigger-change="true"></j-select-depart>
+          </template>
+          </j-editable-table>
         </a-tab-pane>
 
       </a-tabs>
@@ -88,6 +92,7 @@
   import { validateDuplicateValue } from '@/utils/util'
   import JDate from '@/components/jeecg/JDate'
   import JUpload from '@/components/jeecg/JUpload'
+  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
 
   export default {
     name: 'BudgetReplyModal',
@@ -95,6 +100,7 @@
     components: {
       JDate,
       JUpload,
+      JSelectDepart
     },
     data() {
       return {
@@ -106,10 +112,10 @@
           span: 16
         },
         labelCol2: {
-          span: 3
+          span: 2
         },
         wrapperCol2: {
-          span: 20
+          span: 22
         },
         // 新增时子表默认添加几行空数据
         addDefaultRowNum: 1,
@@ -126,6 +132,7 @@
             {required: true, message: '请输入预算年度!'},
           ]},
           budgetTotal: {rules: [
+              {pattern:/^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'},
           ]},
           file: {rules: [
           ]},
@@ -141,34 +148,57 @@
             {
               title: '部门',
               key: 'department',
-              type: FormTypes.input,
+              type: FormTypes.slot,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              slotName: 'department',
             },
             {
               title: '费用资金类别',
               key: 'costFundType',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '预算资金类别',
-              key: 'budgetFundType',
-              type: FormTypes.input,
+              type: FormTypes.select,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              options:[{
+                value: "1",
+                text: "1"
+              },{
+                value: "2",
+                text: "2"
+              },
+                {
+                  value: "3",
+                  text: "3"
+                }]
             },
             {
               title: '预算资金名称',
               key: 'budgetFundName',
-              type: FormTypes.input,
+              type: FormTypes.select,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue: '',
+              options:[{
+                value: "差旅费",
+                text: "差旅费"
+              },{
+                value: "招待费",
+                text: "招待费"
+              },
+                {
+                  value: "车辆使用费",
+                  text: "车辆使用费"
+                },
+                {
+                  value: "会务费",
+                  text: "会务费"
+                },
+                {
+                  value: "办公费",
+                  text: "办公费"
+                }]
             },
             {
               title: '预算资金构成',
@@ -295,6 +325,18 @@
           });
         });
       },
+      //部门插槽更改数据
+      departChange(props) {
+        let values = [
+          {
+            rowKey: props.rowId,
+            values: {
+              'department': props.text,
+            },
+          },
+        ]
+        this.$refs.budgetReplyDetail.setValues(values)
+      }
     }
   }
 </script>