You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1188 lines
40 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div style="display: flex; margin-left: 10px; margin-top: 10px;">
  3. <div style="width:220px;">
  4. <div>
  5. <span>项目类别</span>
  6. <el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" popper-class="example" style="margin-left: 3px;width:160px;"
  7. :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
  8. clearable filterable @change="changeItemType" size="small" :disabled="isComplete">
  9. </el-cascader>
  10. </div>
  11. <div class="mainareaBox">
  12. <el-table :data="asbItem" style="border-radius: 5px;"
  13. :height="(window.pageHeight > 700 ? (window.pageHeight - 440) : 260)" @row-dblclick="dbClickChoosedAsb" highlight-current-row
  14. @selection-change="handleSelectionChange" size="small" :row-class-name="handleRowClassName"
  15. @row-click="chooseAsbItem">
  16. <!--
  17. <el-table-column type="selection" align="center" width="40" />
  18. -->
  19. <el-table-column prop="displayName" label="未选组合项目" />
  20. <!--
  21. <el-table-column prop="price" label="标准价格" width="70">
  22. <template slot-scope="scope">
  23. <div style="text-align: center;">{{ scope.row.price }}</div>
  24. </template>
  25. </el-table-column>
  26. <el-table-column prop="forSexId" label="适用性别" width="70">
  27. <template slot-scope="scope">
  28. <div style="text-align: center;">{{ ldddw(dict.forSex, "id", scope.row.forSexId, "displayName") }}</div>
  29. </template>
  30. </el-table-column>
  31. -->
  32. </el-table>
  33. </div>
  34. </div>
  35. <div style="width:100px;margin-top: 70px;">
  36. <div v-show="checkPagePriv(pagePriv.privs,'添加')" class="btnList">
  37. <el-button class="commonbutton" @click="addAbs(asbItemChoosed,'choosed')" style="width:90px;" :disabled="isComplete">添加 <i class="el-icon-arrow-right"></i>
  38. </el-button>
  39. </div>
  40. <div v-show="checkPagePriv(pagePriv.privs,'全添加')" class="btnList">
  41. <el-button type="success" class="difference" @click="addAbs(asbItemChoosed,'all')" style="width:90px;" :disabled="isComplete">全添加 <i class="el-icon-d-arrow-right"></i>
  42. </el-button>
  43. </div>
  44. <div v-show="checkPagePriv(pagePriv.privs,'移除')" class="btnList">
  45. <el-button type="warning" class="commonbutton" @click="delAbs(patientRegisterAbsChoosed,'choosed')" style="width:90px;" :disabled="isComplete"><i class="el-icon-arrow-left"> 移除</i>
  46. </el-button>
  47. </div>
  48. <div v-show="checkPagePriv(pagePriv.privs,'全移除')" class="btnList">
  49. <el-button type="danger" class="difference" @click="delAbs(patientRegisterAbsChoosed,'all')" style="width:90px;" :disabled="isComplete"><i class="el-icon-d-arrow-left"> 全移除</i>
  50. </el-button>
  51. </div>
  52. <!-- 不显示保存当已选组合有修改时失去焦点自动保存
  53. <div class="btnList">
  54. <el-button type="success" @click="onSubmit('保存')">保存 <i class="el-icon-check"></i>
  55. </el-button>
  56. </div>
  57. -->
  58. </div>
  59. <div :style="'width:' + (window.pageWidth - 110 - 20 - 230 - 100) + 'px;'">
  60. <div style="display: flex;">
  61. <div class="disTotal">
  62. <el-tooltip class="item" effect="dark" content="根据输入的折扣,自动计算折后总价" placement="top">
  63. <span>折扣 </span>
  64. </el-tooltip>
  65. <el-input style="width:55px;" v-model="discount" size="small" type="number" @input="changeAllDiscount"
  66. @focus="discountFoucs = true" @blur="discountFoucs = false" />
  67. </div>
  68. <div class="disTotal">
  69. <el-tooltip class="item" effect="dark" content="总金额即该人员此次体检实收金额,并根据此金额自动计算折扣" placement="top">
  70. <span>总金额 </span>
  71. </el-tooltip>
  72. <el-input style="width:70px;" v-model="total" size="small" type="number" @input="changeTotal" ref="total"
  73. @focus="totalFoucs = true" @blur="totalFoucs = false"/>
  74. </div>
  75. <div class="disTotal">
  76. <el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small"
  77. filterable :filter-method="filterMethod" :disabled="isComplete"
  78. clearable @clear="quickAsb = deepCopy(asbItemQuick)"
  79. @change="quickChoosedAsb" default-first-option ref="quickAsbOCX"
  80. style="width:240px;text-align: left;padding-right: 15px;">
  81. <el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
  82. </el-select>
  83. </div>
  84. </div>
  85. <div class="mainareaBox">
  86. <el-table :data="prAsb" highlight-current-row border ref="patientRegister_patientRegisterAbs" style="border-radius: 5px;"
  87. :height="(window.pageHeight > 700 ? (window.pageHeight - 440) : 260)" width="100%" :summary-method="getSummaries"
  88. show-summary :row-class-name="handleRowClassName" @row-dblclick="removeAbs" @selection-change="selecteditems" size="small"
  89. @row-click="removeAsbItem">
  90. <!-- temporaryselection personnelUnit.nogroupselected-->
  91. <!-- 取消勾选换成选中
  92. <el-table-column type="selection" align="center"/>
  93. -->
  94. <el-table-column label="已选组合项目" min-width="120" prop="asbitemName" >
  95. <template slot-scope="scope">
  96. <div>
  97. <el-tooltip class="item" effect="dark" content="套餐/分组中包含的组合项目" placement="top">
  98. <i v-if="scope.row.groupPackageId" class="el-icon-star-on" style="font-size: 14px;color: purple;"></i>
  99. </el-tooltip>
  100. {{ scope.row.asbitemName }}
  101. </div>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="标准价格" prop="standardPrice" min-width="70" align="center" />
  105. <el-table-column label="折扣" prop="discount" min-width="60">
  106. <template slot-scope="scope">
  107. <el-input type="number" v-model="scope.row.discount" size="small" @input="changeDiscount(scope.$index)" />
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="数量" prop="amount" min-width="50">
  111. <template slot-scope="scope">
  112. <el-input type="number" v-model="scope.row.amount" size="small" @input="changeDiscount(scope.$index)" />
  113. </template>
  114. </el-table-column>
  115. <el-table-column label="实收价格" prop="chargePrice" min-width="70">
  116. <template slot-scope="scope">
  117. <el-input type="number" v-model="scope.row.chargePrice" size="small"
  118. @input="changePrice(scope.$index)" /> <!--立即触发保存 @blur="onSubmit('')" -->
  119. </template>
  120. </el-table-column>
  121. <el-table-column prop="total" label="金额" min-width="70" align="center"/>
  122. <el-table-column prop="standardPrice" label="标准金额" min-width="70" v-if="false" />
  123. <el-table-column label="支付方式" prop="payTypeFlag" min-width="100">
  124. <template slot-scope="scope">
  125. <el-select v-model="scope.row.payTypeFlag" size="small">
  126. <el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
  127. </el-select>
  128. </template>
  129. </el-table-column>
  130. <el-table-column prop="isCharge" label="收费" min-width="40" align="center">
  131. <template slot-scope="scope">
  132. <el-checkbox :value="scope.row.isCharge == 'Y'" />
  133. </template>
  134. </el-table-column>
  135. <el-table-column prop="checkCompleteFlag" label="状态" min-width="40" align="center">
  136. <template slot-scope="scope">
  137. <div>{{ dddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div>
  138. </template>
  139. </el-table-column>
  140. <el-table-column prop="isLock" label="锁" min-width="40" align="center">
  141. <template slot-scope="scope">
  142. <el-checkbox :value="scope.row.isLock == 'Y'" />
  143. </template>
  144. </el-table-column>
  145. <el-table-column prop="creatorName" label="登记人" min-width="70" align="center"></el-table-column>
  146. <el-table-column prop="creationTime" label="登记日期" win-width="90" align="center">
  147. <template slot-scope="scope">
  148. <div>{{ scope.row.creationTime ? moment(scope.row.creationTime).format('yyyy-MM-DD'):'' }}</div>
  149. </template>
  150. </el-table-column>
  151. </el-table>
  152. </div>
  153. </div>
  154. </div>
  155. </template>
  156. <script>
  157. import moment from 'moment';
  158. import { mapState, mapActions } from "vuex";
  159. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  160. import { getPagePriv,checkPagePriv, arrayFilter, arrayReduce, arrayExistObj, dddw, deepCopy, tcdate} from "../../utlis/proFunc";
  161. import proApi from "../../utlis/proApi";
  162. export default {
  163. props: ["prForm","prAsbOpraOpts","triggerHeadSave","refreshFormId"],
  164. data() {
  165. return {
  166. pagePriv:{
  167. routeUrlorPageName:'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称
  168. privs:[] // 页面权限
  169. },
  170. oldFormId:'', //配合登记人员复制新增使用
  171. itemType: [], //项目类别
  172. itemTypeIds: '', //被选中的项目类别ID
  173. asbItem:[], //左侧显示的未选组合项目
  174. asbItemAll:[], //所有未选组合项目
  175. asbItemChoosed: [], //勾选的 未选组合项目
  176. startPoint:-1,
  177. //patientRegisterAbs:[], //体检人员所选组合项目 放vuex
  178. patientRegisterAbsChoosed: [], //勾选的 体检人员所选组合项目
  179. PstartPoint:-1,
  180. //patientRegisterAbsDel: [], //体检人员 待删除的组合项目
  181. prAsb:[], //当前显示的已选组合项目(新增与编辑的在一起)
  182. prAsbDels:[], //待提交 删除的组合项目
  183. groupAsbs:[], //分组包含的项目
  184. packageAsbs:[], //套餐包含的项目
  185. asbItemId: '',
  186. discount: 100,
  187. total: 0,
  188. totalStand: 0,
  189. quickAsb: [],
  190. asbItemQuick:[],
  191. totalFoucs: false, //总价是否获取焦点
  192. discountFoucs: false, //总折扣是否获取焦点
  193. };
  194. },
  195. computed: {
  196. ...mapState(["window", "dataTransOpts", "dict", "customerOrg", "patientRegister", "personnelUnit"]),
  197. //是否总检
  198. isComplete(){
  199. return this.prForm.completeFlag == '3' ? true:false;
  200. },
  201. },
  202. created(){
  203. //获取用户当前页面的权限
  204. let userPriv = window.sessionStorage.getItem('userPriv')
  205. if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  206. this.dictInit()
  207. },
  208. updated(){
  209. this.$nextTick(() => {
  210. this.$refs['patientRegister_patientRegisterAbs'].doLayout()
  211. })
  212. },
  213. mounted() {
  214. },
  215. methods: {
  216. ...mapActions(['getCustomerOrgGroup', 'getPatientRegisterAbs']),
  217. dddw,moment,deepCopy,checkPagePriv,
  218. // 初始化字典信息
  219. dictInit(){
  220. // 项目类别 树结构
  221. getapi("/api/app/item-type/by-code-all").then((res) => {
  222. if (res.code != -1) {
  223. this.dict.itemTypeTree = res.data;
  224. tcdate(this.dict.itemTypeTree);
  225. }
  226. });
  227. // 获取组合项目
  228. postapi('/api/app/asbitem/getasbitemlist',{isFilterActive:'Y'}).then(res =>{
  229. if(res.code != -1){
  230. this.asbItem = res.data
  231. this.asbItemAll = res.data
  232. this.asbItemQuick = res.data
  233. this.quickAsb = res.data
  234. }
  235. });
  236. },
  237. // 获取人员组合项目信息
  238. async getPrAsb(id){
  239. // debugger
  240. // 清空待删除、分组、套餐
  241. console.log('getPrAsb(id)',`getPrAsb(${id})`)
  242. this.prAsbDels = []
  243. this.groupAsbs = []
  244. this.packageAsbs = []
  245. let result = await proApi.getPrAsb(id)
  246. this.prAsb = result.data
  247. this.refreshAsbitem()
  248. },
  249. // 复制新增 拷贝明细项目
  250. async copyNew(){
  251. if(this.oldFormId){
  252. let result = await proApi.getPrAsb(this.oldFormId)
  253. this.prAsb = result.data
  254. this.prAsb.forEach(e => {
  255. e.id = '';
  256. e.patientRegisterId = '';
  257. e.isCharge = 'N';
  258. e.checkCompleteFlag = '0'
  259. e.isLock = 'N'
  260. })
  261. this.refreshAsbitem()
  262. }
  263. },
  264. // 刷新未选组合项目
  265. refreshAsbitem(){
  266. let asbItemAll = deepCopy(this.asbItemAll)
  267. let choosedAsb = this.prAsb.filter(e => {
  268. return e.checkCompleteFlag == '0' || !(e.checkCompleteFlag)
  269. }) // 如果已经检查,则可以重新选进来(复查)
  270. arrayReduce(asbItemAll, choosedAsb, "id=asbitemId");
  271. this.changeItemType();
  272. this.asbItemQuick = deepCopy(asbItemAll);
  273. this.quickAsb = deepCopy(asbItemAll);
  274. },
  275. handleRowClassName({ row, rowIndex }) {
  276. if (row.choosed) {
  277. return 'current-row';
  278. } else {
  279. return '';
  280. }
  281. },
  282. //选择 未选的组合项目
  283. chooseAsbItem(row){
  284. this.asbItem.forEach((e,index) => {
  285. e.index = index;
  286. return e
  287. });
  288. // 按住了shift键
  289. if (this.window.shift) {
  290. //清除所有选择
  291. this.asbItem.forEach(e => {
  292. e.choosed = false;
  293. return e
  294. });
  295. if (this.startPoint == - 1) {
  296. this.asbItem[row.index].choosed = true;
  297. this.startPoint = row.index;
  298. return
  299. }
  300. if (this.startPoint > row.index) {
  301. for (let i = row.index; i <= this.startPoint; i++) {
  302. this.asbItem[i].choosed = true
  303. }
  304. } else if (this.startPoint <= row.index) {
  305. for (let i = this.startPoint; i <= row.index; i++) {
  306. this.asbItem[i].choosed = true
  307. }
  308. }
  309. return
  310. }
  311. // 按住了ctrl 键
  312. if (this.window.ctrl) {
  313. console.log('this.window.ctrl',this.window.ctrl,this.asbItem)
  314. this.asbItem[row.index].choosed = true;
  315. this.startPoint = row.index;
  316. return
  317. }
  318. // 未按住了ctrl 、shift 键
  319. //清除所有选择
  320. //console.log('清除所有选择')
  321. this.asbItem.forEach(e => {
  322. e.choosed = false;
  323. return e
  324. });
  325. this.asbItem[row.index].choosed = true;
  326. this.startPoint = row.index;
  327. },
  328. //选择 已选的组合项目
  329. removeAsbItem(row){
  330. this.prAsb.forEach((e,index) => {
  331. e.index = index;
  332. return e
  333. });
  334. // 按住了shift键
  335. if (this.window.shift) {
  336. //清除所有选择
  337. this.prAsb.forEach(e => {
  338. e.choosed = false;
  339. return e
  340. });
  341. if (this.PstartPoint == - 1) {
  342. this.prAsb[row.index].choosed = true;
  343. this.PstartPoint = row.index;
  344. return
  345. }
  346. if (this.PstartPoint > row.index) {
  347. for (let i = row.index; i <= this.PstartPoint; i++) {
  348. this.prAsb[i].choosed = true
  349. }
  350. } else if (this.PstartPoint <= row.index) {
  351. for (let i = this.PstartPoint; i <= row.index; i++) {
  352. this.prAsb[i].choosed = true
  353. }
  354. }
  355. return
  356. }
  357. // 按住了ctrl 键
  358. if (this.window.ctrl) {
  359. console.log('this.window.ctrl',this.window.ctrl,this.prAsb)
  360. this.prAsb[row.index].choosed = true;
  361. this.PstartPoint = row.index;
  362. return
  363. }
  364. // 未按住了ctrl 、shift 键
  365. //清除所有选择
  366. //console.log('清除所有选择')
  367. this.prAsb.forEach(e => {
  368. e.choosed = false;
  369. return e
  370. });
  371. this.prAsb[row.index].choosed = true;
  372. this.PstartPoint = row.index;
  373. },
  374. //更新所选组合项目
  375. async onSubmit(msg) {
  376. let ret = false
  377. ret = await this.batchAddAsb()
  378. if(!ret){
  379. if(msg) this.$message.warning(`组合项目 ${msg} 失败!`)
  380. return
  381. }
  382. ret = await this.batchDelAsb()
  383. if(!ret){
  384. if(msg) this.$message.warning(`组合项目 ${msg} 失败!`)
  385. return
  386. }
  387. ret = await this.batchEditAsb()
  388. if(!ret){
  389. if(msg) this.$message.warning(`组合项目 ${msg} 失败!`)
  390. return
  391. }
  392. console.log('this.prAsbOpraOpts.formId',this.prAsbOpraOpts.formId)
  393. if(this.prAsbOpraOpts.formId){
  394. this.refreshFormId()
  395. }else{
  396. //触发保存人员基本信息
  397. this.triggerHeadSave()
  398. this.getPrAsb(this.prForm.id)
  399. }
  400. },
  401. //未选组合项目 勾选情况
  402. handleSelectionChange(val) {
  403. // this.selecteddata = val;
  404. this.asbItemChoosed = val;
  405. //console.log(this.asbItemChoosed);
  406. },
  407. // 添加组合项目
  408. ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
  409. addAbs(asbItemChoosed,oprType) {
  410. let checked = true
  411. let payTypeFlag = '0' //默认个人支付
  412. //勾选时不需要此操作 start
  413. if(oprType && oprType == 'all'){
  414. asbItemChoosed = deepCopy(this.asbItem)
  415. }else if(oprType && oprType == 'choosed'){
  416. asbItemChoosed = []
  417. this.asbItem.forEach(e =>{
  418. if(e.choosed){
  419. asbItemChoosed.push(e)
  420. e.choosed = false
  421. }
  422. })
  423. }
  424. //勾选时不需要此操作 end
  425. if (asbItemChoosed.length < 1) {
  426. this.$message.warning("请选择要添加的组合项目")
  427. return
  428. }
  429. //性别、年龄判断
  430. // "displayName": "身高体重",
  431. // "shortName": "哈f哈",
  432. // "forSexId": "F",
  433. // "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
  434. // "price": 0,
  435. console.log('asbItemChoosed.length', asbItemChoosed.length)
  436. for (let i = 0; i < asbItemChoosed.length; i++) {
  437. if (this.prForm.sexId == 'U') break //未选性别时,无需判断组合项目性别限制
  438. if (asbItemChoosed[i].forSexId == 'A') continue
  439. if (asbItemChoosed[i].forSexId != this.prForm.sexId) {
  440. this.$message.warning(`所选项目:${asbItemChoosed[i].displayName},不适合当前人员性别`)
  441. checked = false
  442. break
  443. }
  444. }
  445. //console.log(222,checked)
  446. if (!checked) return
  447. if (this.prForm.customerOrgId != this.dict.personOrgId) payTypeFlag = '1'
  448. for (let i = 0; i < asbItemChoosed.length; i++) {
  449. let pojo = {
  450. asbitemId: asbItemChoosed[i].id,
  451. asbitemName: asbItemChoosed[i].displayName,
  452. patientRegisterId: this.prForm.id,
  453. standardPrice: asbItemChoosed[i].price,
  454. chargePrice: asbItemChoosed[i].price,
  455. payTypeFlag,
  456. isCharge: "N",
  457. checkCompleteFlag:'0',
  458. discount:100,
  459. amount: 1,
  460. total: asbItemChoosed[i].price,
  461. }
  462. this.prAsb.push(pojo)
  463. }
  464. this.refreshAsbitem()
  465. },
  466. //人员已选组合项目 勾选情况
  467. selecteditems(val) {
  468. this.patientRegisterAbsChoosed = val
  469. },
  470. //批量提交添加组合项目
  471. async batchAddAsb() {
  472. let ret = false
  473. let patientRegisterId = this.prForm.id || this.prAsbOpraOpts.formId
  474. if(!patientRegisterId){
  475. this.$message.warning("人员基本信息未保存");
  476. return ret
  477. }
  478. let registerAsbitems = []
  479. this.prAsb.forEach(e => {
  480. if(!e.id){
  481. registerAsbitems.push({
  482. asbitemId: e.asbitemId,
  483. patientRegisterId,
  484. standardPrice: e.standardPrice,
  485. chargePrice: e.chargePrice,
  486. payTypeFlag: e.payTypeFlag,
  487. isCharge: e.isCharge,
  488. amount: e.amount,
  489. groupPackageId: e.groupPackageId
  490. })
  491. }
  492. })
  493. if(registerAsbitems.length == 0) return true
  494. let body = {
  495. organizationUnitId:this.prForm.organizationUnitId,
  496. registerAsbitems,
  497. isAutoMerger:'Y'
  498. }
  499. try {
  500. let res = await postapi('/api/app/registerasbitem/createregisterasbitemmany', body)
  501. if(res.code != -1) ret = true
  502. } catch (error) {
  503. console.log('批量添加组合项目失败',error)
  504. }
  505. return ret
  506. },
  507. //批量提交更新组合项目
  508. async batchEditAsb() {
  509. let ret = false
  510. let body = []
  511. this.prAsb.forEach(e => {
  512. if(e.id){
  513. body.push({
  514. registerAsbitemId:e.id,
  515. input: {
  516. chargePrice: e.chargePrice,
  517. payTypeFlag: e.payTypeFlag,
  518. isCharge: e.isCharge,
  519. amount: e.amount,
  520. groupPackageId: e.groupPackageId
  521. }
  522. })
  523. }
  524. })
  525. if(body.length == 0) return true
  526. try {
  527. let res = await postapi(`/api/app/registerasbitem/updatemany`, body)
  528. if(res.code != -1) ret = true
  529. } catch (error) {
  530. console.log('批量提交更新组合项目失败',error)
  531. }
  532. return ret
  533. },
  534. //批量提交删除组合项目
  535. async batchDelAsb() {
  536. let ret = false
  537. if(this.prAsbDels.length == 0) return true
  538. let registerAsbitemIds=[]
  539. this.prAsbDels.forEach(e => {
  540. registerAsbitemIds.push(e.id)
  541. })
  542. console.log(`/api/app/registerasbitem/deletemany`, {registerAsbitemIds})
  543. try {
  544. let res = await postapi(`/api/app/registerasbitem/deletemany`, {registerAsbitemIds})
  545. if(res.code != -1) ret = true
  546. } catch (error) {
  547. console.log('批量删除组合项目失败',error)
  548. }
  549. return ret
  550. },
  551. //删除 人员已选中的组合项目
  552. ///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6
  553. delAbs(absForDel,oprType) {
  554. let chargeComplete = ''
  555. let lfind = -1
  556. let tempRd = {}
  557. //勾选时不需要此操作 start
  558. if(oprType && oprType == 'all'){
  559. absForDel = deepCopy(this.prAsb)
  560. }else if(oprType && oprType == 'choosed'){
  561. absForDel = []
  562. this.prAsb.forEach(e =>{
  563. if(e.choosed){
  564. absForDel.push(e)
  565. e.choosed = false
  566. }
  567. })
  568. }
  569. //勾选时不需要此操作 end
  570. if (absForDel.length < 1) {
  571. this.$message.warning("请选择要移除的组合项目")
  572. return
  573. }
  574. absForDel.forEach(e => {
  575. // 如果已经收费 或 体检,则不允许删除
  576. if (e.isCharge == 'Y' || (e.checkCompleteFlag && e.checkCompleteFlag != '0')) {
  577. chargeComplete += e.asbitemName + ','
  578. }else{
  579. lfind = arrayExistObj(this.prAsb, 'asbitemId', e.asbitemId)
  580. if(lfind > -1){
  581. tempRd = Object.assign({},this.prAsb.splice(lfind,1)[0])
  582. if(e.id) this.prAsbDels.push(tempRd)
  583. }
  584. }
  585. })
  586. //刷新
  587. this.refreshAsbitem()
  588. if (chargeComplete) {
  589. this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  590. }
  591. },
  592. //双击删除已选项目
  593. removeAbs(row) {
  594. if(this.isComplete){
  595. this.$message.info('人员已总检,不可 添加/删除 组合项目')
  596. return
  597. }
  598. this.delAbs([row]);
  599. },
  600. //项目类别过滤 组合项目,未过滤已选择的组合项目
  601. changeItemType() {
  602. //console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
  603. let asbItemAll = deepCopy(this.asbItemAll)
  604. let lv = "";
  605. if (typeof this.itemTypeIds == "object") {
  606. if(this.itemTypeIds.length > 0) lv = this.itemTypeIds[this.itemTypeIds.length - 1];
  607. }
  608. if (lv) {
  609. this.asbItem = arrayFilter(asbItemAll, "itemTypeId", lv);
  610. } else {
  611. this.asbItem = deepCopy(asbItemAll);
  612. }
  613. arrayReduce(this.asbItem, this.prAsb, "id=asbitemId");
  614. },
  615. //选中 分组 所包含的组合项目
  616. getGroupAsbs(id){
  617. if(!id){
  618. this.groupAsbs = []
  619. this.changeGroup(id)
  620. return
  621. }
  622. getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${id}`)
  623. .then((res) => {
  624. if(res.code != -1){
  625. this.groupAsbs = res.data
  626. this.changeGroup(id)
  627. }
  628. });
  629. },
  630. //选中 套餐 所包含的组合项目
  631. getPackageAsbs(id){
  632. if(!id){
  633. this.packageAsbs = []
  634. this.changePackage(id)
  635. return
  636. }
  637. postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem',{medicalPackageId:id})
  638. .then((res) => {
  639. if(res.code != -1){
  640. this.packageAsbs = res.data
  641. this.changePackage(id)
  642. }
  643. });
  644. },
  645. // 更换分组
  646. changeGroup(newId){
  647. //已收费项目,不更改收费方式、价格及数量,只更改分组id
  648. let payTypeFlag = '0'
  649. let lfind = -1
  650. let tempRd = {}
  651. if(!newId){
  652. this.setGroupPackageNull()
  653. return
  654. }
  655. if (this.prForm.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  656. for(let i = this.prAsb.length - 1;i>-1;i--){
  657. lfind = arrayExistObj(this.groupAsbs,'asbitemId',this.prAsb[i].asbitemId)
  658. if(lfind > -1){
  659. //找到了则更新此项目
  660. tempRd = Object.assign({},this.groupAsbs.splice(lfind,1)[0])
  661. this.prAsb[i].groupPackageId = newId
  662. if(this.prAsb[i].isCharge != 'Y'){
  663. this.prAsb[i].payTypeFlag = payTypeFlag
  664. this.prAsb[i].amount = tempRd.customerOrgGroupDetailAmount
  665. this.prAsb[i].standardPrice = tempRd.price
  666. this.prAsb[i].chargePrice = tempRd.customerOrgGroupDetailPrice
  667. this.prAsb[i].discount = tempRd.discount
  668. }
  669. }else{
  670. //没找到则移除此项目
  671. if(this.prAsb[i].isCharge == 'Y' || (this.prAsb[i].checkCompleteFlag && this.prAsb[i].checkCompleteFlag != '0')){
  672. this.prAsb[i].groupPackageId = null
  673. }else{
  674. tempRd = Object.assign({},this.prAsb.splice(i,1)[0])
  675. if(tempRd.id) this.prAsbDels.push(tempRd)
  676. }
  677. }
  678. }
  679. // debugger
  680. //未找到则添加(如果在待删除中找到记录,则待删除中记录移至当前显示记录中来)
  681. this.groupAsbs.forEach(e =>{
  682. lfind = arrayExistObj(this.prAsbDels,'asbitemId',e.asbitemId)
  683. if(lfind > -1){
  684. tempRd = Object.assign(this.prAsbDels.splice(lfind,1)[0],
  685. {
  686. groupPackageId:newId,
  687. standardPrice:e.price,
  688. chargePrice:e.customerOrgGroupDetailPrice,
  689. payTypeFlag,
  690. isCharge: "N",
  691. discount:e.discount,
  692. amount:e.customerOrgGroupDetailAmount,
  693. total: Math.round(e.customerOrgGroupDetailAmount * e.customerOrgGroupDetailPrice * 100)/100
  694. }
  695. )
  696. }else{
  697. tempRd = {
  698. groupPackageId:newId,
  699. asbitemId:e.asbitemId,
  700. asbitemName:e.displayName,
  701. patientRegisterId:this.prForm.id,
  702. standardPrice:e.price,
  703. chargePrice:e.customerOrgGroupDetailPrice,
  704. payTypeFlag,
  705. isCharge: "N",
  706. discount:e.discount,
  707. amount:e.customerOrgGroupDetailAmount,
  708. total: Math.round(e.customerOrgGroupDetailAmount * e.customerOrgGroupDetailPrice * 100)/100
  709. }
  710. }
  711. this.prAsb.push(tempRd)
  712. })
  713. this.refreshAsbitem()
  714. },
  715. // 更换套餐
  716. changePackage(newId){
  717. //已收费项目,不更改收费方式、价格及数量,只更改分组id
  718. let payTypeFlag = '0'
  719. let lfind = -1
  720. let tempRd = {}
  721. if(!newId){
  722. this.setGroupPackageNull()
  723. return
  724. }
  725. if (this.prForm.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  726. for(let i = this.prAsb.length - 1;i>-1;i--){
  727. lfind = arrayExistObj(this.packageAsbs,'id',this.prAsb[i].asbitemId)
  728. if(lfind > -1){
  729. //找到了则更新此项目
  730. tempRd = Object.assign({},this.packageAsbs.splice(lfind,1)[0])
  731. this.prAsb[i].groupPackageId = newId
  732. if(this.prAsb[i].isCharge != 'Y'){
  733. this.prAsb[i].payTypeFlag = payTypeFlag
  734. this.prAsb[i].amount = tempRd.medicalPackageDetailAmount
  735. this.prAsb[i].standardPrice = tempRd.price
  736. this.prAsb[i].chargePrice = tempRd.medicalPackageDetailPrice
  737. this.prAsb[i].discount = tempRd.discount
  738. }
  739. }else{
  740. //没找到则移除此项目
  741. if(this.prAsb[i].isCharge == 'Y' || (this.prAsb[i].checkCompleteFlag && this.prAsb[i].checkCompleteFlag != '0')){
  742. this.prAsb[i].groupPackageId = null
  743. }else{
  744. tempRd = Object.assign({},this.prAsb.splice(i,1)[0])
  745. if(tempRd.id) this.prAsbDels.push(tempRd)
  746. }
  747. }
  748. }
  749. //未找到则添加(如果在待删除中找到记录,则待删除中记录移至当前显示记录中来)
  750. this.packageAsbs.forEach(e =>{
  751. lfind = arrayExistObj(this.prAsbDels,'asbitemId',e.id)
  752. if(lfind > -1){
  753. tempRd = Object.assign(this.prAsbDels.splice(lfind,1)[0],
  754. {
  755. groupPackageId:newId,
  756. standardPrice:e.price,
  757. chargePrice:e.medicalPackageDetailPrice,
  758. payTypeFlag,
  759. isCharge: "N",
  760. discount:e.discount,
  761. amount:e.medicalPackageDetailAmount,
  762. total: Math.round(e.medicalPackageDetailAmount * e.medicalPackageDetailPrice * 100)/100
  763. }
  764. )
  765. }else{
  766. tempRd = {
  767. groupPackageId:newId,
  768. asbitemId:e.id,
  769. asbitemName:e.displayName,
  770. patientRegisterId:this.prForm.id,
  771. standardPrice:e.price,
  772. chargePrice:e.medicalPackageDetailPrice,
  773. payTypeFlag,
  774. isCharge: "N",
  775. discount:e.discount,
  776. amount:e.medicalPackageDetailAmount,
  777. total: Math.round(e.medicalPackageDetailAmount * e.medicalPackageDetailPrice * 100)/100
  778. }
  779. }
  780. this.prAsb.push(tempRd)
  781. })
  782. this.refreshAsbitem()
  783. },
  784. // 从 有分组/套餐 切换成 无分组/套餐 时
  785. setGroupPackageNull(){
  786. this.prAsb.forEach(e =>{
  787. e.groupPackageId = null
  788. })
  789. },
  790. //双击选择组合项目
  791. dbClickChoosedAsb(row) {
  792. if(this.isComplete){
  793. this.$message.info('人员已总检,不可 添加/删除 组合项目')
  794. return
  795. }
  796. this.addAbs([row]);
  797. },
  798. //快速选择组合项目
  799. quickChoosedAsb(v) {
  800. //远程查询时,设置了 value-key 也不管用,只能取到value console.log('quickChoosedAsb',v)
  801. let lfind = -1
  802. if (v) {
  803. lfind = arrayExistObj(this.asbItemQuick, 'id', v)
  804. if (lfind > -1) {
  805. this.addAbs([this.asbItemQuick[lfind]])
  806. }
  807. }
  808. //this.$refs['quickAsbOCX'].focus(); //asbItemId
  809. this.$nextTick(() => {
  810. this.$refs['quickAsbOCX'].blur(); //total asbItemId
  811. this.asbItemId = ''
  812. this.quickAsb = deepCopy(this.asbItemQuick)
  813. this.$refs['quickAsbOCX'].focus(); //total asbItemId
  814. });
  815. },
  816. //快速选择组合项目时,调整可按拼间简码及简称查找
  817. filterMethod(keyWords) {
  818. //console.log('filterMethod',this.asbItemQuick)
  819. if (keyWords) {
  820. this.quickAsb = [];
  821. this.asbItemQuick.forEach(item => {
  822. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  823. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  824. || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  825. this.quickAsb.push(item);
  826. }
  827. });
  828. } else {
  829. this.quickAsb = deepCopy(this.asbItemQuick);
  830. }
  831. },
  832. //修改总折扣
  833. changeAllDiscount() {
  834. if (!this.discount || this.discount == 0) return
  835. if (!this.prAsb || this.prAsb.length == 0) return
  836. this.prAsb.forEach(e => {
  837. e.discount = this.discount
  838. e.chargePrice = Math.round(e.standardPrice * this.discount) / 100
  839. e.total = Math.round(e.standardPrice * this.discount * e.amount) / 100
  840. });
  841. // this.onSubmit('')
  842. },
  843. //修改总金额
  844. changeTotal() {
  845. if (!this.total) return
  846. if (!this.prAsb || this.prAsb.length == 0) return
  847. let sumChargeDetails = Number(0) //单个标准价折后价 合计总计
  848. let qtyIsOneLast = 0 //数量为1的最后行项目,用于返写金额
  849. // console.log('this.total / this.totalStand',this.total , this.totalStand)
  850. this.discount = Math.round((100 * this.total / this.totalStand) * 100)/100
  851. this.prAsb.forEach((e, index) => {
  852. if (e.amount == 1 && e.standardPrice != 0) qtyIsOneLast = index
  853. e.discount = this.discount
  854. e.chargePrice = Math.round((e.standardPrice * this.discount / 100) * 100)/100
  855. e.total = Math.round((e.standardPrice * this.discount * e.amount / 100) * 100)/100
  856. sumChargeDetails += Math.round((e.standardPrice * this.discount * e.amount / 100) * 100)/100
  857. });
  858. console.log('this.prAsb',this.prAsb)
  859. // console.log('this.total - sumChargeDetails', sumChargeDetails, this.total - sumChargeDetails)
  860. //平衡金额(按总价折扣后,再根据折扣合计 会出现金额差)
  861. if (this.total != sumChargeDetails) {
  862. console.log('qtyIsOneLast',qtyIsOneLast)
  863. this.prAsb[qtyIsOneLast].total =
  864. Math.round((Number(this.prAsb[qtyIsOneLast].total) + Number(this.total) - Number(sumChargeDetails))*100)/100
  865. this.prAsb[qtyIsOneLast].chargePrice =
  866. Math.round(this.prAsb[qtyIsOneLast].total * 100 / this.prAsb[qtyIsOneLast].amount)/100
  867. if(this.prAsb[qtyIsOneLast].standardPrice != 0){
  868. this.prAsb[qtyIsOneLast].discount =
  869. Math.round(this.prAsb[qtyIsOneLast].chargePrice * 10000/this.prAsb[qtyIsOneLast].standardPrice)/100
  870. }
  871. }
  872. //this.onSubmit('')
  873. },
  874. //修改数量
  875. changeDiscount(index) {
  876. //console.log('index',index)
  877. if (!this.prAsb || this.prAsb.length == 0) return
  878. if (!this.prAsb[index].discount) return
  879. //console.log(this.prAsb[index].chargePrice,this.prAsb[index].standardPrice)
  880. this.prAsb[index].chargePrice = Math.round(this.prAsb[index].standardPrice * this.prAsb[index].discount)/100
  881. this.prAsb[index].total = this.prAsb[index].chargePrice * this.prAsb[index].amount
  882. // this.onSubmit('')
  883. },
  884. //修改单价
  885. changePrice(index) {
  886. //console.log('index',index)
  887. if (!this.prAsb || this.prAsb.length == 0) return
  888. if (!this.prAsb[index].chargePrice) return
  889. //console.log(this.prAsb[index].chargePrice,this.prAsb[index].standardPrice)
  890. this.prAsb[index].discount = Math.round(this.prAsb[index].chargePrice * 10000 / this.prAsb[index].standardPrice)/100
  891. // this.onSubmit('')
  892. },
  893. //自定义计算列
  894. getSummaries(param) {
  895. const { columns, data } = param;
  896. const sumCol = [1, 5] //需合计的列
  897. const sums = [];
  898. columns.forEach((column, index) => {
  899. //console.log('column, index,data',column, index,data)
  900. //显示合计列
  901. if (index === 0) {
  902. sums[index] = '合计';
  903. return;
  904. }
  905. //不合计的列
  906. if (sumCol.indexOf(index) == -1) {
  907. sums[index] = '';
  908. return;
  909. }
  910. sums[index] = 0
  911. data.forEach(e => {
  912. if (!isNaN(e[column.property])){
  913. if(index == 1){
  914. sums[index] += e[column.property] * e['amount']
  915. }else{
  916. sums[index] += e[column.property]
  917. }
  918. }
  919. })
  920. sums[index] = Math.round(sums[index] * 100)/100 //+ ' 元';
  921. // const values = data.map(item => Number(item[column.property]));
  922. // if (!values.every(value => isNaN(value))) {
  923. // sums[index] = values.reduce((prev, curr) => {
  924. // const value = Number(curr);
  925. // if (!isNaN(value)) {
  926. // //return prev + curr; //原始
  927. // return prev + curr; //改造
  928. // } else {
  929. // return prev;
  930. // }
  931. // }, 0);
  932. // sums[index] = sums[index].toFixed(2) + ' 元';
  933. // } else {
  934. // sums[index] = 'N/A';
  935. // }
  936. });
  937. this.totalStand = sums[1];
  938. //console.log('this.totalFoucs/this.discountFoucs',this.totalFoucs,this.discountFoucs)
  939. if (!this.totalFoucs) this.total = sums[5];
  940. if (!this.discountFoucs) this.discount = Math.round(this.total * 10000 / this.totalStand)/100;
  941. return sums;
  942. },
  943. },
  944. //监听事件
  945. watch: {
  946. // //配合复制新增使用 查询人员下的组合项目
  947. // "prForm.id":{
  948. // immediate: true, // 立即执行
  949. // // deep: true, // 深度监听复杂类型内变化
  950. // handler(newVal,oldVal){
  951. // console.log('人员登记 组合项目明细,人员id:',newVal,oldVal)
  952. // this.oldFormId = oldVal
  953. // this.getPrAsb(newVal)
  954. // // if(newVal != oldVal){
  955. // // this.getPrAsb(newVal)
  956. // // }
  957. // }
  958. // },
  959. // //人员 id 未变的情况下,亦可触发刷新组合项目
  960. // "prAsbOpraOpts.prAsbQuery":{
  961. // // immediate: true, // 立即执行
  962. // // deep: true, // 深度监听复杂类型内变化
  963. // handler(newVal,oldVal){
  964. // console.log('watch:prAsbOpraOpts.prAsbQuery:',newVal,oldVal)
  965. // if(newVal != oldVal){
  966. // this.getPrAsb(this.prForm.id)
  967. // }
  968. // }
  969. // },
  970. "dataTransOpts.refresh.register_asbitem.M":{
  971. immediate: true, // 立即执行
  972. // deep: true, // 深度监听复杂类型内变化
  973. handler(newVal,oldVal){
  974. console.log('watch: 刷新 人员登记/编辑 时的组合项目: ',this.dataTransOpts.tableS.patient_register.id)
  975. this.getPrAsb(this.dataTransOpts.tableS.patient_register.id)
  976. }
  977. },
  978. //按钮更新支付方式
  979. "prAsbOpraOpts.payTypeFlag":{
  980. // immediate: true, // 立即执行
  981. // deep: true, // 深度监听复杂类型内变化
  982. handler(newVal, oldVal) {
  983. if (newVal != oldVal && newVal != '') {
  984. this.prAsb.forEach(e =>{
  985. e.payTypeFlag = newVal;
  986. return e;
  987. });
  988. // this.onSubmit('调整支付方式');
  989. }
  990. }
  991. },
  992. //更换分组
  993. "prAsbOpraOpts.prAsbGroup":{
  994. // immediate: true, // 立即执行
  995. // deep: true, // 深度监听复杂类型内变化
  996. handler(newVal, oldVal) {
  997. if (newVal != oldVal) {
  998. this.getGroupAsbs(this.prForm.customerOrgGroupId)
  999. }
  1000. }
  1001. },
  1002. //更换套餐
  1003. "prAsbOpraOpts.prAsbPackage":{
  1004. // immediate: true, // 立即执行
  1005. // deep: true, // 深度监听复杂类型内变化
  1006. handler(newVal, oldVal) {
  1007. if (newVal != oldVal) {
  1008. this.getPackageAsbs(this.prForm.medicalPackageId)
  1009. }
  1010. }
  1011. },
  1012. //复制新增 拷贝明细项目
  1013. "prAsbOpraOpts.copyNew":{
  1014. // immediate: true, // 立即执行
  1015. // deep: true, // 深度监听复杂类型内变化
  1016. handler(newVal, oldVal) {
  1017. if (newVal != oldVal) {
  1018. this.copyNew()
  1019. }
  1020. }
  1021. },
  1022. //体检信息保存,触发已选组合项目保存
  1023. "prAsbOpraOpts.prAsbSave"(newVal, oldVal) {
  1024. console.log("patientRegister.saveTimes newVal:", newVal, " oldVal:", oldVal);
  1025. if (newVal != oldVal) {
  1026. this.onSubmit('');
  1027. }
  1028. },
  1029. },
  1030. };
  1031. </script>
  1032. <style lang="scss" scoped>
  1033. @import "../../assets/css/global_table.css";
  1034. @import "../../assets/css/global_input.css";
  1035. @import "../../assets/css/global.css";
  1036. .mainareaBox {
  1037. border: 1px solid #888;
  1038. height: v-bind("(window.pageHeight > 700 ? (window.pageHeight - 440) : 260) + 'px'");
  1039. margin-top: 5px;
  1040. border-radius: 5px;
  1041. }
  1042. .btnList {
  1043. margin-top: 5px;
  1044. margin-left: 5px;
  1045. margin-right: 5px;
  1046. }
  1047. .disTotal {
  1048. margin-left: 10px;
  1049. }
  1050. </style>