From e888346ebcd8e3e099a15c7edd7bf367c057193a Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 04 三月 2025 15:33:33 +0800
Subject: [PATCH] Merge branch 'refs/heads/dev'

---
 src/views/CNAS/systemManagement/customerManagement/components/formDialog.vue |  256 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 256 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/systemManagement/customerManagement/components/formDialog.vue b/src/views/CNAS/systemManagement/customerManagement/components/formDialog.vue
new file mode 100644
index 0000000..13e5d6d
--- /dev/null
+++ b/src/views/CNAS/systemManagement/customerManagement/components/formDialog.vue
@@ -0,0 +1,256 @@
+<template>
+  <div>
+    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="瀹㈡埛婊℃剰搴﹁皟鏌ヨ〃"
+      width="70%" @close="closeFormDia">
+      <table border="1" cellspacing="10" class="tables">
+        <tr>
+          <td class="td-title">
+            <p>鍗曚綅鍚嶇О锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-input v-model="form.unitName" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+          <td class="td-title">
+            <p>鏃ユ湡锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-date-picker v-model="form.fillDate" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" type="date"
+              value-format="yyyy-MM-dd">
+            </el-date-picker>
+          </td>
+        </tr>
+        <tr>
+          <td class="td-title">
+            <p>濮撳悕锛�</p>
+          </td>
+          <td class="td-info">
+            <el-input v-model="form.userName" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+          <td class="td-title">
+            <p>閮ㄩ棬锛�</p>
+          </td>
+          <td class="td-info">
+            <el-input v-model="form.department" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+          <td class="td-title">
+            <p>鑱旂郴鐢佃瘽锛�</p>
+          </td>
+          <td class="td-info">
+            <el-input v-model="form.contactNumber" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+        </tr>
+        <tr>
+          <td class="td-title">
+            <p>鏈嶅姟鎬佸害锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-radio-group v-model="form.serviceAttitude" v-removeAriaHidden>
+              <el-radio :label="0">婊℃剰</el-radio>
+              <el-radio :label="1">涓�鑸�</el-radio>
+              <el-radio :label="2">涓嶆弧鎰�</el-radio>
+            </el-radio-group>
+          </td>
+          <td class="td-title">
+            <p>寤鸿锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-input v-model="form.serviceAttitudeSuggestion" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+        </tr>
+        <tr>
+          <td class="td-title">
+            <p>鎶�鏈兘鍔涳細</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-radio-group v-model="form.technicalCompetence" v-removeAriaHidden>
+              <el-radio :label="0">婊℃剰</el-radio>
+              <el-radio :label="1">涓�鑸�</el-radio>
+              <el-radio :label="2">涓嶆弧鎰�</el-radio>
+            </el-radio-group>
+          </td>
+          <td class="td-title">
+            <p>寤鸿锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-input v-model="form.technicalCompetenceSuggestion" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+        </tr>
+        <tr>
+          <td class="td-title">
+            <p>妫�娴嬪伐浣滐細</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-radio-group v-model="form.inspectionWork" v-removeAriaHidden>
+              <el-radio :label="0">婊℃剰</el-radio>
+              <el-radio :label="1">涓�鑸�</el-radio>
+              <el-radio :label="2">涓嶆弧鎰�</el-radio>
+            </el-radio-group>
+          </td>
+          <td class="td-title">
+            <p>寤鸿锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-input v-model="form.inspectionWorkSuggestion" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+        </tr>
+        <tr>
+          <td class="td-title">
+            <p>鏀惰垂鍚堢悊鎬э細</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-radio-group v-model="form.reasonableFees" v-removeAriaHidden>
+              <el-radio :label="0">婊℃剰</el-radio>
+              <el-radio :label="1">涓�鑸�</el-radio>
+              <el-radio :label="2">涓嶆弧鎰�</el-radio>
+            </el-radio-group>
+          </td>
+          <td class="td-title">
+            <p>寤鸿锛�</p>
+          </td>
+          <td class="td-info" colspan="2">
+            <el-input v-model="form.reasonableFeesSuggestion" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
+            </el-input>
+          </td>
+        </tr>
+        <tr>
+          <td class="td-title">
+            <p>鎮ㄥ鎴戜滑鐨勫笇鏈涳細</p>
+          </td>
+          <td class="td-info" colspan="5">
+            <el-input v-model="form.remark" :rows="4" placeholder="璇疯緭鍏ュ唴瀹�" size="small" type="textarea">
+            </el-input>
+          </td>
+        </tr>
+      </table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeFormDia">鍙� 娑�</el-button>
+        <el-button :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addClientSatisfaction,
+  updateClientSatisfaction
+} from '@/api/cnas/systemManagement/customerSatisfaction.js'
+export default {
+  name: 'formDialog',
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: {},
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      formDia: false,
+      form: {
+        unitName: '',
+        fillDate: '',
+        userName: '',
+        department: '',
+        contactNumber: '',
+        serviceAttitude: '',
+        technicalCompetence: '',
+        technicalCompetenceSuggestion: '',
+        inspectionWork: '',
+        inspectionWorkSuggestion: '',
+        reasonableFees: '',
+        reasonableFeesSuggestion: '',
+        remark: '',
+        clientSatisfactionId: '',
+      },
+      operationType: '',
+      editLoad: false,
+
+    };
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    openDia(type, row) {
+      this.formDia = true;
+      this.operationType = type
+      if (this.operationType === 'edit') {
+        this.form = { ...row }
+      }
+    },
+    handleEdit() {
+      if (!this.form.unitName) {
+        this.$message.warning('璇峰~鍐欏崟浣嶅悕绉�')
+        return
+      }
+      if (!this.form.department) {
+        this.$message.warning('璇峰~鍐欓儴闂�')
+        return
+      }
+      this.editLoad = true
+      if (this.operationType === 'add') {
+        addClientSatisfaction(this.form).then(res => {
+          this.editLoad = false
+          if (res.code === 201) return
+          this.$message.success('鎻愪氦鎴愬姛')
+          this.closeFormDia()
+        }).catch(err => {
+          console.log('err---', err);
+          this.editLoad = false
+        })
+      } else {
+        updateClientSatisfaction(this.form).then(res => {
+          this.editLoad = false
+          if (res.code === 201) return
+          this.$message.success('鎻愪氦鎴愬姛')
+          this.closeFormDia()
+        }).catch(err => {
+          console.log('err---', err);
+          this.editLoad = false
+        })
+      }
+    },
+    closeFormDia() {
+      this.formDia = false;
+      this.$emit('closeFormDia')
+    },
+  }
+};
+</script>
+
+<style scoped>
+>>>.el-dialog {
+  margin: 10vh auto 50px !important;
+}
+
+.tables {
+  table-layout: fixed;
+  width: 100%;
+  margin-top: 10px;
+}
+
+.td-title {
+  height: 40px;
+  width: 170px;
+  text-align: center;
+  font-size: 14px;
+  word-wrap: break-word;
+  white-space: normal;
+  padding: 6px;
+}
+
+.td-info {
+  padding: 6px;
+}
+
+.td-info1 {
+  display: inline-block;
+  width: 100%;
+  text-align: left;
+  font-size: 14px;
+  word-wrap: break-word;
+  white-space: normal;
+}
+</style>

--
Gitblit v1.9.3