Prechádzať zdrojové kódy

增加其它往来类型

lilei 1 rok pred
rodič
commit
087296312f

+ 7 - 0
src/api/expenseManagement.js

@@ -16,6 +16,13 @@ export const employeeQueryList = (params) => {
     method: 'post'
   })
 }
+// 其它往来人员
+export const otherOrgQuery = (params) => {
+  return axios({
+    url: `/otherorg/queryAll`,
+    method: 'get'
+  })
+}
 
 // 费用报销单列表
 export const expenseAccountList = (params) => {

+ 83 - 0
src/views/common/otherTransactions.js

@@ -0,0 +1,83 @@
+import { otherOrgQuery } from '@/api/expenseManagement.js'
+const Employee = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        :disabled="disabledFlag"
+        @change="handleChange"
+        option-filter-prop="children"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :key="item.otherOrgSn" :value="item.otherOrgSn">
+        {{ item.otherOrgName }}
+        </a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择其它往来机构'
+    },
+    enableFlag: {
+      type: String,
+      default: ''
+    },
+    disabledFlag: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      list: []
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange (value) {
+      this.defaultVal = value
+      const item = this.list.find(item => item.supplierSn == value)
+      this.$emit('input', value)
+      this.$emit('change', value, item)
+    },
+    getList () {
+      otherOrgQuery().then(res => {
+        if (res.status == 200) {
+          if (this.enableFlag != '') {
+            this.list = res.data.filter(item => item.enableFlag == this.enableFlag)
+          } else {
+            this.list = res.data
+          }
+        } else {
+          this.list = []
+        }
+      })
+    }
+  }
+}
+
+export default Employee

+ 8 - 1
src/views/expenseManagement/expenseReimbursement/epenseCdfModal.vue

@@ -48,6 +48,12 @@
                 enableFlag="1"
                 v-model="record.splitObjSn"
                 placeholder="请选择(输入名称搜索)"></supplier>
+              <!-- 其它往来 -->
+              <otherTransactions 
+              style="width: 100%;"
+              v-show="record.splitObjType=='OTHER_ORG'" 
+              v-model="record.splitObjSn" 
+              placeholder="请选择(输入名称搜索)"></otherTransactions>
               <span v-if="!record.splitObjType">--</span>
             </template>
             <!-- 费用承担金额 -->
@@ -131,8 +137,9 @@ import department from './department.js'
 import employee from './employee.js'
 import custList from '@/views/common/custList.vue'
 import supplier from '@/views/common/supplier.js'
+import otherTransactions from '@/views/common/otherTransactions.js'
 export default {
-  components: { VSelect, department, employee, custList, supplier },
+  components: { VSelect, department, employee, custList, supplier, otherTransactions },
   name: 'EpenseCdfModal',
   props: {
     list: { //  弹框显示状态

+ 4 - 1
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -38,6 +38,8 @@
                   <custList v-show="form.accountType=='CUSTOMER'" cooperateFlag="1" ref="custList" @change="accountNameSnChange" placeholder="请选择记账名称(输入名称搜索)"></custList>
                   <!-- 供应商 -->
                   <supplier v-show="form.accountType=='OUT_ACCOUNT'" enableFlag="1" @change="accountNameSnChange" v-model="form.accountNameSn" placeholder="请选择记账名称(输入名称搜索)"></supplier>
+                  <!-- 其它往来 -->
+                  <otherTransactions v-show="form.accountType=='OTHER_ACCOUNT'" @change="accountNameSnChange" v-model="form.accountNameSn" placeholder="请选择记账名称(输入名称搜索)"></otherTransactions>
                   <span v-if="!form.accountType">
                     <a-select style="width: 100%" placeholder="请选择记账名称">
                       <a-select-option value="" :disabled="true">
@@ -118,11 +120,12 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import custList from '@/views/common/custList.vue'
 import supplier from '@/views/common/supplier.js'
+import otherTransactions from '@/views/common/otherTransactions.js'
 import department from './department.js'
 import { expenseAcctDetailSave, expenseAcctDetailFindBySn } from '@/api/expenseManagement.js'
 export default {
   name: 'EpenseDetailModal',
-  components: { VSelect, subarea, Area, epenseCdfModal, custList, supplier, department },
+  components: { VSelect, subarea, Area, epenseCdfModal, custList, supplier, department, otherTransactions },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.103:8602/ocs-admin',
+        target: 'http://192.168.2.103:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {