浏览代码

手术安排的备注可以编辑

lighter 2 年之前
父节点
当前提交
fa373c7fa8
共有 1 个文件被更改,包括 23 次插入2 次删除
  1. 23 2
      src/views/surgical-management/SurgeryArrangement.vue

+ 23 - 2
src/views/surgical-management/SurgeryArrangement.vue

@@ -132,7 +132,15 @@
           </template>
         </el-table-column>
         <el-table-column label="台次" prop="sstc" width="35"></el-table-column>
-        <el-table-column label="备注" prop="remark"></el-table-column>
+        <el-table-column label="备注">
+          <template #default="scope">
+            <div v-if="scope.row.remark" @click="inputRemark(scope.row.recordId, scope.row.remark)"
+                 :title="scope.row.remark">{{ scope.row.remark }}</div>
+            <div v-else style="width: 100%; text-align: center">
+              <el-button plain circle icon="Edit" title="编辑备注" @click="inputRemark(scope.row.recordId, scope.row.remark)"></el-button>
+            </div>
+          </template>
+        </el-table-column>
         <el-table-column label="手术开始时间" prop="opStartDate" width="118"></el-table-column>
         <el-table-column label="手术结束时间" prop="opEndDate" width="118"></el-table-column>
         <el-table-column label="麻醉开始时间" prop="anstStartDate" width="118"></el-table-column>
@@ -208,7 +216,7 @@ import {
   updateArrangement
 } from '@/api/surgical-management/surgery-arrangement'
 import { shortcuts } from '@/data/shortcuts.js'
-import {formatDate, formatDatetime, getDateRangeFormatDate, getDateRangeFormatDateTime} from '@/utils/date'
+import {formatDate, formatDatetime, getDateRangeFormatDate, getDateRangeFormatDateTime, getDatetime} from '@/utils/date'
 import { listIsBlank, stringIsBlank, stringNotBlank } from '@/utils/blank-utils'
 import store from '@/store'
 import {ElMessage, ElMessageBox} from 'element-plus'
@@ -216,6 +224,7 @@ import PageLayer from '@/layout/PageLayer.vue'
 import Search from '@/components/search/Index.vue'
 import router from '@/router'
 import { initLodop, getLodop } from '@/utils/c-lodop'
+import {refundOrder} from "@/api/wxpay-refund";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -359,6 +368,18 @@ const handleSelectionChange = (orderId, key, value) => {
   })
 }
 
+const inputRemark = (orderId, remark) => {
+  ElMessageBox.prompt('请输入备注:', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    inputValue: remark,
+    inputPattern: /\S/,
+    inputErrorMessage: '请输入备注内容',
+  }).then(({value}) => {
+    handleArrangementChange(orderId, 'remark', value)
+  }).catch(() => {})
+}
+
 const handleArrangementChange = (orderId, key, value) => {
   return new Promise((resolve, reject) => {
     updateArrangement(orderId, key, value).then(() => {