ソースを参照

提交费用报销的支付方式

Lijy 1 年間 前
コミット
00650061ea

+ 57 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -407,6 +407,8 @@
                   '未发放' }}</span>
               </template>
             </el-table-column>
+            <el-table-column prop="payWayName" label="支付方式" width="80" v-if="permissions.costExpenseRelease">
+            </el-table-column>
             <el-table-column fixed="right" :label="$t('operation')" :width="isAuditList ? 220 : 160">
               <template slot-scope="scope">
                 <div v-if="!isAuditList">
@@ -1057,6 +1059,19 @@
     <div class="customIamgeLoad">
       <input id="uploadInput" ref="uploadInput" type="file" class="file" @change="fileMultLoad" multiple accept="image/jpg,image/png,application/pdf" />
     </div>
+
+    <!-- 发放支付方式 -->
+    <el-dialog title="发放方式" :visible.sync="dialogVisibleRelease" width="400px" :before-close="handleClose">
+      <div>
+        <el-select v-model="releaseData.id" placeholder="请选择支付方式" style="width: 100%" clearable>
+          <el-option v-for="item in sendStateList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+        </el-select>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleRelease = false">取 消</el-button>
+        <el-button type="primary" @click="callingInterface(1, releaseData.data)">确 定</el-button>
+      </span>
+    </el-dialog>
   </section>
 </template>
 
@@ -1170,6 +1185,13 @@ export default {
       dialogVisibleImage: false,
       dialogVisibleImageList: [],
       imgLoadType: 1, // 1 为 费用填报的图片上传 2 单据修改的图片上传
+
+      releaseData: {
+        id: '',
+        data: '',
+      }, // 发放数据
+      sendStateList: [], // 发放状态列表
+      dialogVisibleRelease: false, // 发放弹出框
     };
   },
   computed: {
@@ -1202,6 +1224,7 @@ export default {
     this.getExpList();
     this.getBasecostItemList();
     this.getAuditType();
+    this.getSendStateList();
   },
   filters: {
     numberToCurrency(value) {
@@ -2400,14 +2423,24 @@ export default {
         return;
       }
 
+      if(type == 1 && this.sendStateList.length > 0) {
+        this.releaseData = {
+          id: '',
+          data: unissueds
+        } 
+        this.dialogVisibleRelease = true
+        return
+      }
       this.callingInterface(type, type == 1 ? unissueds : Issueds);
     },
     callingInterface(type, ids) {
       this.http.post('/expense-sheet/editSendExpense', {
         expenseIds: ids.join(','),
-        sendState: type
+        sendState: type,
+        payWayId: this.releaseData.id || ''
       },
         res => {
+          this.dialogVisibleRelease = false
           if (res.code == "ok") {
             this.$message({
               message: '操作成功',
@@ -2422,6 +2455,7 @@ export default {
           }
         },
         error => {
+          this.dialogVisibleRelease = false
           this.$message({
             message: error,
             type: "error"
@@ -2533,6 +2567,28 @@ export default {
       // 新窗口打开pdf
       window.open(urls)
     },
+    // 获取发放方式
+    getSendStateList() {
+      this.http.post('/expense-pay-way/get', {
+        companyId: this.user.companyId
+      },
+        res => {
+          if (res.code == "ok") {
+            this.sendStateList = res.data;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        });
+    }
   },
   beforeDestroy() {