From bbf5ed473459bad34fa4281596a2faf99381d93e Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 08 三月 2024 09:55:58 +0800
Subject: [PATCH] 11

---
 src/views/project/unitCost/index.vue |  312 ++++------------------------------------------------
 1 files changed, 24 insertions(+), 288 deletions(-)

diff --git a/src/views/project/unitCost/index.vue b/src/views/project/unitCost/index.vue
index 46c2196..5cd6c8e 100644
--- a/src/views/project/unitCost/index.vue
+++ b/src/views/project/unitCost/index.vue
@@ -169,244 +169,7 @@
       @pagination="getList"
     />
 
-    <!-- 娣诲姞鎴栦慨鏀规崘鐚渚嬪櫒瀹樺垪瀵硅瘽妗� -->
-    <el-dialog
-      :title="title"
-      :visible.sync="open"
-      append-to-body
-      align="center"
-      :close-on-click-modal="false"
-      width="1200px"
-    >
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-row>
-          <el-col :span="12"
-            ><el-form-item label="OPO缂栧彿" prop="donateno">
-              <el-input v-model="form.donateno" placeholder="璇疯緭鍏PO缂栧彿" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="濮撳悕" prop="name">
-              <el-input v-model="form.name" placeholder="璇疯緭鍏ュ鍚�" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="鎹愮尞鏃堕棿" prop="donatetime">
-              <el-date-picker
-                clearable
-                size="small"
-                v-model="form.donatetime"
-                type="date"
-                value-format="yyyy-MM-dd"
-                style="width: 174px"
-                placeholder="閫夋嫨鎹愮尞鏃堕棿"
-              >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6"
-            ><el-form-item label="鍑虹敓骞存湀" prop="borthdate">
-              <el-date-picker
-                clearable
-                size="small"
-                v-model="form.borthdate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                style="width: 174px"
-                placeholder="閫夋嫨鍑虹敓骞存湀"
-              >
-              </el-date-picker> </el-form-item
-          ></el-col>
-          <el-col :span="6"
-            ><el-form-item label="骞撮緞" prop="age">
-              <el-input
-                v-model="form.age"
-                placeholder="璇疯緭鍏ュ勾榫�"
-              /> </el-form-item
-          ></el-col>
-          <el-col :span="6">
-            <el-form-item label="鎬у埆" prop="sex">
-              <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
-                <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" />
-              </el-select> </el-form-item
-          ></el-col>
-          <el-col :span="6"
-            ><el-form-item label="鎹愮尞绫诲埆" prop="donationcategory">
-              <el-input
-                v-model="form.donationcategory"
-                placeholder="璇疯緭鍏ユ崘鐚被鍒�"
-              /> </el-form-item
-          ></el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6"
-            ><el-form-item label="鎹愮尞妗堜緥ID" prop="infoid">
-              <el-input
-                v-model="form.infoid"
-                placeholder="璇疯緭鍏ユ崘鐚渚婭D"
-              /> </el-form-item
-          ></el-col>
-          <el-col :span="6"
-            ><el-form-item label="鎹愮尞鍣ㄥ畼" prop="donateorgan">
-              <el-input
-                v-model="form.donateorgan"
-                placeholder="璇疯緭鍏ユ崘鐚殑鍣ㄥ畼"
-              /> </el-form-item
-          ></el-col>
-          <el-col :span="6"
-            ><el-form-item label="搴旀敹璐圭敤" prop="chargeamount">
-              <el-input
-                v-model="form.chargeamount"
-                placeholder="璇疯緭鍏ュ簲鏀惰垂鐢�"
-              /> </el-form-item
-          ></el-col>
-          <el-col :span="6"
-            ><el-form-item label="宸叉敹璐圭敤" prop="chargeamounted">
-              <el-input
-                v-model="form.chargeamounted"
-                placeholder="璇疯緭鍏ュ凡鏀惰垂鐢�"
-              /> </el-form-item
-          ></el-col> </el-row
-        ><el-row>
-          <el-col :span="24"
-            ><el-form-item label="澶囨敞" prop="remark">
-              <el-input
-                v-model="form.remark"
-                placeholder="璇疯緭鍏ュ娉�"
-              /> </el-form-item
-          ></el-col>
-        </el-row>
-        <el-row>
-          <el-table
-            :data="donorchargerogans"
-            v-loading="loading"
-            max-height="1200"
-            border
-            highlight-current-row
-          >
-            <el-table-column
-              prop="orderno"
-              align="center"
-              label="搴忓彿"
-              width="80"
-            >
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="organno"
-              align="center"
-              label="鍣ㄥ畼缂栧彿"
-              width="90"
-            >
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.organno" placeholder="鍣ㄥ畼缂栧彿" />
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="organname"
-              align="center"
-              label="鍣ㄥ畼鍚嶇О"
-              width="100"
-            >
-              <template slot-scope="scope">
-                <el-input
-                  v-model="scope.row.organname"
-                  placeholder="鍣ㄥ畼鍚嶇О"
-                />
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="hospitalname"
-              align="center"
-              label="鎺ユ敹鍖婚櫌"
-              width="200"
-            >
-              <template slot-scope="scope">
-                <el-input
-                  v-model="scope.row.hospitalname"
-                  placeholder="鎺ユ敹鍖婚櫌"
-                />
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="amounttime"
-              align="center"
-              label="鎺ユ敹鏃堕棿"
-              width="120"
-            >
-              <template slot-scope="scope">
-                <el-date-picker
-                  clearable
-                  size="small"
-                  style="width: 100%"
-                  v-model="scope.row.amounttime"
-                  type="date"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  placeholder="鎺ユ敹鏃堕棿"
-                >
-                </el-date-picker>
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="amount"
-              align="center"
-              label="宸叉敹璐圭敤"
-              width="120"
-            >
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.amount" placeholder="宸叉敹璐圭敤" />
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="amounttime"
-              align="center"
-              label="鏀舵鏃堕棿"
-              width="120"
-            >
-              <template slot-scope="scope">
-                <el-date-picker
-                  clearable
-                  size="small"
-                  style="width: 100%"
-                  v-model="scope.row.amounttime"
-                  type="date"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  placeholder="鏀舵鏃堕棿"
-                  @blur="getdays(scope.row)"
-                >
-                </el-date-picker>
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="organcharge"
-              align="center"
-              label="鏍囧噯璐圭敤"
-              width="120"
-            >
-              <template slot-scope="scope">
-                <el-input
-                  v-model="scope.row.organcharge"
-                  placeholder="宸叉敹璐圭敤"
-                />
-              </template>
-            </el-table-column>
-            <el-table-column prop="remark" align="center" label="澶囨敞">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.remark" placeholder="澶囨敞" />
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
-        <el-button @click="cancel">鍙� 娑�</el-button>
-      </div>
-    </el-dialog>
+
 
     <el-dialog
       :visible.sync="showSelectionDialog"
@@ -425,7 +188,7 @@
           >
             <org-selecter
               ref="addOrgSelect"
-              :org-type="'3'"
+              :org-type="'4'"
               v-model="selectionForm.donorid"
             />
           </el-form-item>
@@ -444,13 +207,13 @@
 import {
   listDonorcharge,
   getDonorcharge,
-  delDonorcharge,
+  delDonorpayment,
   addDonorcharge,
   updateDonorcharge,
   exportDonorcharge,
   listDonorpayment
 } from "@/api/project/donorcharge";
-import { listOrganization,  } from "@/api/project/organization";
+import { listOrganization } from "@/api/project/organization";
 
 import OrgSelecter from "@/views/project/components/orgselect";
 
@@ -481,6 +244,7 @@
       // 鎹愮尞妗堜緥鍣ㄥ畼鍒楄〃鏍兼暟鎹�
       donorchargeList: [],
       donorchargerogans: [],
+    
       //鎹愮尞妗堜緥閫夋嫨
       showSelectionDialog: false,
       donorlist: [],
@@ -495,7 +259,6 @@
       // 寮瑰嚭灞傛爣棰�
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
-      open: false,
       // 鏌ヨ璐圭敤琛ㄥ弬鏁�
       queryParams: {
         pageNum: 1,
@@ -531,18 +294,28 @@
     //涓撳/鍖荤枟鏈烘瀯/璐圭敤鎶ラ攢鏈烘瀯閫夋嫨
     confirmSelection() {
       var curdonorinfo = null;
-      console.log(this.selectionForm.donorid,'donorid');
+      console.log(this.selectionForm.donorid, "donorid");
       //浠庢渚嬪垪琛ㄨ幏鍙栦俊鎭�
       this.donorinfolist.map(item => {
         if (this.selectionForm.donorid == item.id) {
           curdonorinfo = item;
         }
       });
-      this.showSelectionDialog = false;
-      this.$router.push({
-        path: "/cost/particulars",
-        query: { id: 0, operation: "add", data: curdonorinfo }
+      let searchData = {
+        organizationid: this.selectionForm.donorid //浼犲叆鐨勭被鍨�
+      }; //鎼滅储鏉′欢
+      listOrganization(searchData).then(res => {
+        if (res.code == 200) {
+          curdonorinfo = res.rows[0];
+          this.$router.push({
+            path: "/cost/particulars",
+            query: { id: 0, operation: "add", data: curdonorinfo }
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
       });
+      this.showSelectionDialog = false;
     },
 
     /** 鏌ヨ鎹愮尞妗堜緥鍣ㄥ畼鍒楀垪琛� */
@@ -553,21 +326,9 @@
         this.total = response.total;
         this.loading = false;
       });
-      let searchData = {
-        organizationtype: '3', //浼犲叆鐨勭被鍨�
-        pageNum: 1,
-        pageSize: 100000
-      }; //鎼滅储鏉′欢
-      listOrganization(searchData).then(res => {
-        console.log(res);
-      });
     },
 
-    // 鍙栨秷鎸夐挳
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
+
     // 琛ㄥ崟閲嶇疆
     reset() {
       this.form = {
@@ -643,12 +404,7 @@
         this.showSelectionDialog = true;
       }
 
-      /** 
-        this.reset();
-        this.open = true;
-        this.title = "鎹愮尞妗堜緥鍣ㄥ畼璐圭敤鎯呭喌";
-        this.donorchargerogans = [];
-        */
+
     },
 
     /** 淇敼鎸夐挳鎿嶄綔 */
@@ -673,7 +429,7 @@
       this.$modal
         .confirm('鏄惁纭鍒犻櫎鎹愮尞妗堜緥鍣ㄥ畼鍒楃紪鍙蜂负"' + ids + '"鐨勬暟鎹」锛�')
         .then(function() {
-          return delDonorcharge(ids);
+          return delDonorpayment(ids);
         })
         .then(() => {
           this.getList();
@@ -697,27 +453,7 @@
         })
         .catch(() => {});
     },
-
-    /** 鎻愪氦鎸夐挳 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateDonorcharge(this.form).then(response => {
-              this.$modal.msgSuccess("淇敼鎴愬姛");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addDonorcharge(this.form).then(response => {
-              this.$modal.msgSuccess("鏂板鎴愬姛");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    }
+ 
   }
 };
 </script>

--
Gitblit v1.9.3