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.

1260 lines
44 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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="font-size: 14px;">
  3. <div>
  4. <div class="contenttitle">
  5. 体检登记 /<span class="contenttitleBold">体检收费</span>
  6. </div>
  7. <div style="display: flex; width: 100%;">
  8. <!-- 查询条件 与列表 -->
  9. <div :style="`display: block;width: ${Math.floor(bodyWidth * 3 / 5)}px;`">
  10. <!-- 查询条件 -->
  11. <div style="height: 60px;padding: 10px;border-radius: 8px;background-color: #fff;margin-bottom: 10px;">
  12. <div style="display:flex;">
  13. <div>
  14. <span>登记日期</span>
  15. <el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small"
  16. style="width:90px;" />
  17. <span style="margin: 0 3px;"></span>
  18. <el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width:90px;" />
  19. </div>
  20. <div style="margin-left:10px;">
  21. <el-button type="primary" class="commonbutton" @click="Query" size="small"
  22. style="width:95px;">查询</el-button>
  23. </div>
  24. </div>
  25. <div style="display:flex;">
  26. <el-radio-group v-model="query.chargeFlag" @input="Query" size="mini" style="margin-top:8px;">
  27. <el-radio label="N">未收费</el-radio>
  28. <el-radio label="Y">已收费</el-radio>
  29. <el-radio label="B">已退费</el-radio>
  30. </el-radio-group>
  31. <div v-if="query.chargeFlag != 'N'" style="margin-left:20px;">
  32. <span>发票号</span>
  33. <el-input placeholder="发票/收据号" v-model="query.invoiceNo" size="small"
  34. style="margin-left: 3px; width: 100px;" clearable @change="Query('invoiceNo')" />
  35. </div>
  36. </div>
  37. </div>
  38. <!-- 列表 -->
  39. <div style="padding: 10px;border-radius: 8px;background-color: #fff;">
  40. <el-table :data="patientList" border highlight-current-row ref="patientList" :height="tableListHeight"
  41. @row-click="rowClick" size="small">
  42. <!--
  43. <el-table-column prop="patientRegisterId" label="体检记录ID" />
  44. -->
  45. <el-table-column prop="customerOrgParentName" label="单位" width="180">
  46. <template slot-scope="scope">
  47. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}
  48. </div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="patientName" label="姓名" />
  52. <el-table-column prop="sexId" label="性别" />
  53. <el-table-column prop="age" label="年龄" />
  54. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  55. <el-table-column prop="patientNo" label="档案号" />
  56. <el-table-column prop="medicalTimes" label="体检次数" />
  57. <el-table-column prop="isVip" label="是否VIP">
  58. <template slot-scope="scope">
  59. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="salesman" label="介绍人" />
  63. <el-table-column prop="invoiceNo" label="发票号" />
  64. <el-table-column prop="invoiceOrgName" label="发票抬头" />
  65. <!--
  66. <el-table-column prop="chargeId" label="介绍人" />
  67. <el-table-column prop="chargeBackId" label="介绍人" />
  68. -->
  69. <el-table-column prop="email" label="邮箱" width="180" />
  70. <el-table-column prop="idNo" label="身份证" width="150" />
  71. <el-table-column prop="mobileTelephone" label="手机" width="100" />
  72. <el-table-column prop="telephone" label="电话" width="100" />
  73. <el-table-column prop="address" label="地址" width="300" />
  74. </el-table>
  75. </div>
  76. </div>
  77. <!-- 收费操作 -->
  78. <div :style="`display: block;margin-left:10px;width: ${Math.floor(bodyWidth * 2 / 5)}px;`">
  79. <!-- 查询信息 -->
  80. <div style="height: 40px; background-color: #fff;border-radius: 8px;margin-bottom: 10px;">
  81. <div style="display: flex; flex-wrap: wrap;height:40px; width: 100%;align-items: center;">
  82. <div class="query">
  83. <span>条码号</span>
  84. <el-input placeholder="条码号" v-model="query.patientRegisterNo" size="small"
  85. style="margin-left: 3px; width: 120px;" clearable @change="Query('patientRegisterNo')" />
  86. </div>
  87. <div class="query">
  88. <span>档案号</span>
  89. <el-input placeholder="档案号" v-model="query.patientNo" size="small" style="margin-left: 3px; width: 80px;"
  90. clearable @change="Query('patientNo')" />
  91. </div>
  92. <div class="query">
  93. <span>姓名</span>
  94. <el-input placeholder="姓名" v-model="query.patientName" size="small" style="margin-left: 3px; width: 70px;"
  95. disabled @change="Query" />
  96. </div>
  97. </div>
  98. </div>
  99. <!-- 收费信息 -->
  100. <div>
  101. <!-- charge -->
  102. <div style="padding: 10px;margin-bottom: 7px;background-color: rgb(255, 255, 255);border-radius: 8px;">
  103. <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium"
  104. :disabled="query.chargeFlag != 'N'">
  105. <el-row>
  106. <el-col :span="12">
  107. <el-form-item label="发票号" prop="invoiceNo">
  108. <el-input v-model="form.invoiceNo" size="small" />
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="12">
  112. <el-form-item label="开票抬头" prop="invoiceOrgName">
  113. <el-input v-model="form.invoiceOrgName" size="small" />
  114. </el-form-item>
  115. </el-col>
  116. </el-row>
  117. <el-row>
  118. <el-col :span="12">
  119. <el-form-item label="折扣" prop="discount">
  120. <el-input v-model="form.discount" @input="discountToDetails" size="small" />
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="12">
  124. <el-form-item label="应收金额" prop="total">
  125. <el-input v-model="form.total" @input="totalToDetails" size="small" />
  126. </el-form-item>
  127. </el-col>
  128. </el-row>
  129. <el-row v-if="query.chargeFlag == 'N'">
  130. <el-col :span="12">
  131. <el-form-item label="预收金额" prop="preTotal">
  132. <el-input v-model="form.preTotal" disabled size="small" />
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="12">
  136. <el-form-item label="找零" prop="balance">
  137. <el-input v-model="form.balance" disabled size="small" />
  138. </el-form-item>
  139. </el-col>
  140. </el-row>
  141. </el-form>
  142. </div>
  143. <!-- charge_pay -->
  144. <div style="padding: 10px;background-color: #fff;margin-bottom: 7px;border-radius: 8px;">
  145. <div style="font-size:10px;">{{ query.chargeFlag == 'B' ? '退' : '收' }}费方式</div>
  146. <el-table :data="chargePays" border highlight-current-row size="small"
  147. :height="Math.floor((tableListHeight - 155) / 2)">
  148. <el-table-column prop="payModeId" :label="(query.chargeFlag == 'B' ? '退' : '收') + '费方式'" width="180">
  149. <template slot-scope="scope">
  150. <div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div>
  151. </template>
  152. </el-table-column>
  153. <el-table-column prop="chargeMoney" label="金额">
  154. <template slot-scope="scope">
  155. <el-input type="number" v-model="scope.row.chargeMoney" size="small" @input="inputMoney"
  156. :disabled="query.chargeFlag == 'B'" />
  157. </template>
  158. </el-table-column>
  159. <el-table-column prop="cardRegisterId" label="会员卡">
  160. <template slot-scope="scope">
  161. <el-select v-model="scope.row.cardRegisterId" placeholder="请选择" size="small" filterable clearable
  162. :disabled="scope.row.payModeId == '05' && query.chargeFlag != 'B' ? false : true">
  163. <el-option v-for="item in cardRegister" :key="item.id" :label="item.cardNo" :value="item.id" />
  164. </el-select>
  165. </template>
  166. </el-table-column>
  167. </el-table>
  168. </div>
  169. <!-- asbitem -->
  170. <div style="padding: 10px;background-color: rgb(255, 255, 255);border-radius: 8px;">
  171. <div style="font-size:10px;">{{ query.chargeFlag == 'N' ? '待收' : (query.chargeFlag == 'Y' ?
  172. '已收' : '已退') }}费项目</div>
  173. <el-table :data="asbItemsForFee" border highlight-current-row
  174. :height="Math.floor((tableListHeight - 155) / 2)" size="small" @selection-change="handleSelectionChange"
  175. ref="asbItemsForFeeTable">
  176. <el-table-column type="selection" align="center" v-if="query.chargeFlag == 'N'" />
  177. <el-table-column label="组合项目" width="120" prop="asbitemName" />
  178. <el-table-column label="标准价格" prop="standardPrice" width="80" align="center" />
  179. <el-table-column label="折扣" prop="discount" width="60" align="center">
  180. <template slot-scope="scope">
  181. <el-input type="number" v-model="scope.row.discount" v-if="query.chargeFlag == 'N'"
  182. :disabled="scope.row.isCharge == 'Y' ? true : false" size="small"
  183. @input="changeDiscount(scope.row)" />
  184. <div v-if="query.chargeFlag != 'N'">{{ scope.row.discount }}</div>
  185. </template>
  186. </el-table-column>
  187. <el-table-column label="数量" prop="amount" width="50" align="center" />
  188. <el-table-column label="实收价格" prop="chargePrice" width="80" align="center">
  189. <template slot-scope="scope">
  190. <el-input type="number" v-model="scope.row.chargePrice" v-if="query.chargeFlag == 'N'"
  191. :disabled="scope.row.isCharge == 'Y' ? true : false" size="small" @input="changePrice(scope.row)" />
  192. <div v-if="query.chargeFlag != 'N'">{{ scope.row.chargePrice }}</div>
  193. </template>
  194. </el-table-column>
  195. <el-table-column prop="total" label="金额" width="70" v-if="false" />
  196. <el-table-column prop="standardPrice" label="标准金额" width="80" v-if="false" />
  197. <el-table-column label="支付方式" prop="payTypeFlag" width="100" align="center">
  198. <template slot-scope="scope">
  199. <div>{{ dddw(dict.payType, "id", scope.row.payTypeFlag, "displayName") }}</div>
  200. </template>
  201. </el-table-column>
  202. <el-table-column prop="checkCompleteFlag" label="状态" align="center">
  203. <template slot-scope="scope">
  204. <div>{{ dddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div>
  205. </template>
  206. </el-table-column>
  207. <el-table-column prop="creatorName" label="登记人" align="center" />
  208. <el-table-column prop="creationTime" label="登记日期" width="90" align="center">
  209. <template slot-scope="scope">
  210. <div v-if="scope.row.creationTime">{{ moment(scope.row.creationTime).format('yyyy-MM-DD') }}</div>
  211. </template>
  212. </el-table-column>
  213. </el-table>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="btnDivClass">
  218. <div class="btnListClass">
  219. <el-button type="primary" class="commonbutton" @click="btnCharge"
  220. :disabled="query.chargeFlag == 'N' ? false : true">收费</el-button>
  221. </div>
  222. <div class="btnListClass">
  223. <el-button type="danger" class="commonbutton" @click="btnChargeBack"
  224. :disabled="query.chargeFlag == 'Y' ? false : true">退费</el-button>
  225. </div>
  226. <div class="btnListClass">
  227. <el-button type="success" class="commonbutton" @click="chargePrint('0007', false, form.id)"
  228. :disabled="query.chargeFlag == 'B' ? true : false">打印</el-button>
  229. </div>
  230. <div class="btnListClass">
  231. <el-button type="success" class="commonbutton" @click="chargePrint('0007', true, form.id)"
  232. :disabled="query.chargeFlag == 'B' ? true : false">打印预览</el-button>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </template>
  239. <script>
  240. import moment from 'moment';
  241. import { mapState, mapActions } from "vuex";
  242. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  243. import { tcdate, dddw, arrayExistObj, deepCopy } from "../../utlis/proFunc";
  244. import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue";
  245. import PatientRegisterRefuseList from "../../components/patientRegister/PatientRegisterRefuseList.vue";
  246. export default {
  247. components: {
  248. PatientRegisterQuery,
  249. PatientRegisterRefuseList,
  250. },
  251. props: ["patientRegisterNo"],
  252. data() {
  253. return {
  254. query: {
  255. chargeFlag: 'N', // N:未收费,Y:已收费,B:已退费
  256. dateRange: null,
  257. startDate: null,
  258. endDate: null,
  259. patientRegisterNo: '',
  260. patientNo: '',
  261. invoiceNo: '',
  262. patientName: '',
  263. },//查询条件
  264. patientList: [],//人员列表
  265. formInit: {},
  266. form: {
  267. id: null,
  268. patientRegisterId: null,
  269. invoiceNo: '',
  270. invoiceOrgName: '',
  271. chargeFlag: '0',
  272. discount: 100,
  273. total: 0, //应收金额
  274. preTotal: 0, //预收金额
  275. balance: 0, //找零
  276. }, //收费主表
  277. rules: {
  278. invoiceNo: [
  279. { required: true, message: "请填写发票/收据号", trigger: "blur" },
  280. ],
  281. total: [
  282. { required: true, message: "请填写应收金额", trigger: "blur" },
  283. ],
  284. },
  285. // pickerOptions: {
  286. // shortcuts: [
  287. // {
  288. // text: "最近一周",
  289. // onClick(picker) {
  290. // const end = new Date();
  291. // const start = new Date();
  292. // start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  293. // picker.$emit("pick", [start, end]);
  294. // },
  295. // },
  296. // {
  297. // text: "最近一个月",
  298. // onClick(picker) {
  299. // const end = new Date();
  300. // const start = new Date();
  301. // start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  302. // picker.$emit("pick", [start, end]);
  303. // },
  304. // },
  305. // {
  306. // text: "最近三个月",
  307. // onClick(picker) {
  308. // const end = new Date();
  309. // const start = new Date();
  310. // start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  311. // picker.$emit("pick", [start, end]);
  312. // },
  313. // },
  314. // ],
  315. // },
  316. chargePays: [], //收支方式
  317. chargePaysInit: [], //收支方式(初始状态)
  318. asbItemsForFee: [], //待收费项目
  319. selectedData: [], //选中项目
  320. cardRegister: [{ id: '00000000-0000-0000-0000-000000000000', cardNo: '0001' }], //当前客户的会员卡
  321. cardRegisterAll: [], //所有客户的会员卡
  322. };
  323. },
  324. created() {
  325. this.formInit = Object.assign({}, this.form)
  326. this.dictInit();
  327. },
  328. //挂载完成
  329. mounted() {
  330. if (this.patientRegisterNo) {
  331. this.Query('patientRegisterNo');
  332. } else {
  333. this.Query();
  334. }
  335. },
  336. computed: {
  337. ...mapState(["window", "dict", "dataTransOpts", "patientRegister", "customerOrg"]),
  338. tableListHeight() {
  339. let tempH = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
  340. return tempH - 175 - 30
  341. },
  342. bodyWidth() {
  343. let tempW = this.window.pageWidth < 600 ? 600 : this.window.pageWidth
  344. return tempW - 110 - 25
  345. }
  346. },
  347. methods: {
  348. ...mapActions(["getCustomerOrgGroup"]),
  349. dddw, moment,
  350. //查询人员列表数据
  351. Query(type) {
  352. let url = '', ltype = type, body = {};
  353. // {
  354. // "skipCount": 2147483647,
  355. // "sorting": "string",
  356. // "patientName": "string",
  357. // "patientNo": "string",
  358. // "patientRegisterNo": "string",
  359. // "invoiceNo": "string",
  360. // "startDate": "string",
  361. // "endDate": "string",
  362. // "maxResultCount": 0
  363. // }
  364. if (this.patientRegisterNo) {
  365. this.query.patientRegisterNo = this.patientRegisterNo
  366. ltype = 'patientRegisterNo'
  367. }
  368. console.log('query', ltype, this.query, this.patientRegisterNo);
  369. if (ltype == 'patientRegisterNo') {
  370. if (!this.query.patientRegisterNo) return;
  371. body = { patientRegisterNo: this.query.patientRegisterNo };
  372. } else if (ltype == 'patientNo') {
  373. if (!this.query.patientNo) return;
  374. body = { patientNo: this.query.patientNo };
  375. } else if (ltype == 'invoiceNo' && this.query.chargeFlag != 'N') {
  376. if (!this.query.invoiceNo) return;
  377. body = { invoiceNo: this.query.invoiceNo };
  378. } else {
  379. if (this.query.startDate && this.query.endDate) {
  380. body.startDate = moment(this.query.startDate).format("yyyy-MM-DD")
  381. body.endDate = moment(this.query.endDate).format("yyyy-MM-DD")
  382. if (body.startDate > body.endDate) {
  383. this.$message.warning("起始日期不能大于截止日期,数据校验不通过!")
  384. return
  385. }
  386. }
  387. }
  388. switch (this.query.chargeFlag) {
  389. case 'Y':
  390. //已收费
  391. url = '/api/app/patientregister/getpatientregisterchargelist';
  392. break;
  393. case 'B':
  394. //已退费
  395. url = '/api/app/patientregister/getpatientregisterchargebacklist';
  396. break;
  397. default:
  398. //未收费
  399. url = '/api/app/patientregister/getpatientregisternotchargedlist'
  400. break;
  401. }
  402. const loading = this.$loading({
  403. lock: true,
  404. text: 'Loading',
  405. spinner: 'el-icon-loading',
  406. background: 'rgba(0, 0, 0, 0.7)'
  407. });
  408. postapi(url, body).then(res => {
  409. console.log(url, body, res)
  410. if (res.code != - 1) {
  411. this.patientList = res.data.items;
  412. //this.patientList.length == 1 && this.query.chargeFlag == 'N'
  413. if (this.patientList.length > 0) {
  414. // this.query.patientRegisterNo = this.patientList[0].patientRegisterNo;
  415. // this.query.patientName = this.patientList[0].patientName;
  416. // this.query.patientNo = this.patientList[0].patientNo;
  417. this.$nextTick(() => {
  418. setTimeout(() => {
  419. this.$refs['patientList'].setCurrentRow(this.patientList[0])
  420. this.rowClick(this.patientList[0])
  421. }, 20)
  422. })
  423. } else {
  424. this.asbItemsForFee = []
  425. this.form = Object.assign({}, this.formInit)
  426. }
  427. }
  428. loading.close();
  429. })
  430. .catch((err) => {
  431. loading.close();
  432. });
  433. },
  434. //人员列表点击
  435. rowClick(row) {
  436. this.query.patientRegisterNo = row.patientRegisterNo;
  437. this.query.patientName = row.patientName;
  438. this.query.patientNo = row.patientNo;
  439. this.chargePays = deepCopy(this.chargePaysInit);
  440. console.log(this.chargePays, this.chargePaysInit);
  441. if (this.query.chargeFlag == 'B') {
  442. this.form.chargeFlag = '1';
  443. } else {
  444. this.form.chargeFlag = '0';
  445. }
  446. if (row.chargeId) {
  447. this.form.id = row.chargeId;
  448. this.form.invoiceNo = row.invoiceNo;
  449. this.form.invoiceOrgName = row.patientName;
  450. } else {
  451. this.form.id = null;
  452. this.form.invoiceNo = '';
  453. this.form.invoiceOrgName = row.patientName;
  454. }
  455. //获取个人会员卡信息
  456. this.getCardRegister(row.idNo);
  457. switch (this.query.chargeFlag) {
  458. case 'N':
  459. this.getAsbItemsForFee(row.patientRegisterId);
  460. break;
  461. case 'Y':
  462. this.getChargePayByChargeId(row.chargeId);
  463. this.getChargeAsbByChargeid(row.chargeId);
  464. break;
  465. default:
  466. this.getChargeBackPayByChargeBackId(row.chargeBackId);
  467. this.getChargeAsbByChargeid(row.chargeId);
  468. break;
  469. }
  470. },
  471. //获取项目列表
  472. async getAsbItemsForFee(patientRegisterId) {
  473. //待收费项目列表
  474. this.asbItemsForFee = [];
  475. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${patientRegisterId}`)
  476. .then(res => {
  477. if (res.code == 1) {
  478. this.asbItemsForFee = res.data;
  479. for (let i = this.asbItemsForFee.length - 1; i >= 0; i--) {
  480. if (this.asbItemsForFee[i].isCharge == 'Y' || this.asbItemsForFee[i].payTypeFlag == '1') {
  481. this.asbItemsForFee.splice(i, 1);
  482. continue;
  483. }
  484. this.asbItemsForFee[i].chargePriceOri = this.asbItemsForFee[i].chargePrice;
  485. this.asbItemsForFee[i].discount = Math.round(10000 * this.asbItemsForFee[i].chargePrice / this.asbItemsForFee[i].standardPrice) / 100;
  486. this.asbItemsForFee[i].standTotal = this.asbItemsForFee[i].amount * this.asbItemsForFee[i].standardPrice;
  487. this.asbItemsForFee[i].total = this.asbItemsForFee[i].amount * this.asbItemsForFee[i].chargePrice;
  488. }
  489. //勾选已收费项目
  490. this.toCharge(patientRegisterId);
  491. }
  492. });
  493. },
  494. // "chargeId": "3a0d5685-b3a0-0186-0dd4-3b3ac0d2d08c",
  495. // "asbitemId": "3a0c657d-4e73-9bab-68da-56ab2f088bb1",
  496. // "asbitemName": "身高体重",
  497. // "asbitemPrice": 17,
  498. // "chargePrice": 18,
  499. // "amount": 1,
  500. // "registerAsbitemId": "3a0c6589-9b27-68d1-32f6-51082031d11c",
  501. // "creatorName": "admin",
  502. // "lastModifierName": null,
  503. // "lastModificationTime": null,
  504. // "lastModifierId": null,
  505. // "creationTime": "2023-08-30T10:49:48.753174",
  506. // "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  507. // "id": "3a0d5685-b3bb-8dc2-0d14-56af1ddd11f9"
  508. // 获取个人充值卡
  509. getCardRegister(idNo) {
  510. this.cardRegister = [];
  511. if (!idNo) return;
  512. let body = { cardModeId: '0', idNo };
  513. postapi(`/api/app/cardregister/getcardregisterlist`, body).then(res => {
  514. if (res.code != - 1) {
  515. this.cardRegister = res.data;
  516. }
  517. });
  518. },
  519. //获取收费单包含的组合项目
  520. getChargeAsbByChargeid(ChargeId) {
  521. this.asbItemsForFee = [];
  522. getapi(`/api/app/chargeasbitem/getchargeasbiteminchargeid?ChargeId=${ChargeId}`).then(res => {
  523. if (res.code != - 1) {
  524. res.data.forEach(e => {
  525. this.asbItemsForFee.push({
  526. asbitemName: e.asbitemName,
  527. standardPrice: e.asbitemPrice,
  528. chargePrice: e.chargePrice,
  529. chargePriceOri: e.chargePrice,
  530. amount: e.amount,
  531. discount: Math.round(10000 * e.chargePrice / e.asbitemPrice) / 100,
  532. payTypeFlag: e.payTypeFlag,
  533. checkCompleteFlag: e.checkCompleteFlag,
  534. creatorName: e.creatorName,
  535. creationTime: e.creationTime,
  536. });
  537. });
  538. this.sumTotal(this.asbItemsForFee, this.form);
  539. }
  540. });
  541. },
  542. //获取收费方式明细
  543. getChargePayByChargeId(ChargeId) {
  544. let lfind = -1;
  545. getapi(`/api/app/chargepay/getchargepayinchargeid?ChargeId=${ChargeId}`).then(res => {
  546. if (res.code != - 1) {
  547. res.data.forEach(e => {
  548. lfind = arrayExistObj(this.chargePays, 'payModeId', e.payModeId);
  549. if (lfind > - 1) {
  550. this.chargePays[lfind].chargeMoney = e.chargeMoney;
  551. this.chargePays[lfind].cardRegisterId = e.cardRegisterId;
  552. }
  553. });
  554. }
  555. });
  556. },
  557. //获取退费方式明细
  558. getChargeBackPayByChargeBackId(ChargeBackId) {
  559. let lfind = -1;
  560. getapi(`/api/app/chargebackpay/getchargebackpayinchargebackid?ChargeBackId=${ChargeBackId}`).then(res => {
  561. if (res.code != - 1) {
  562. res.data.forEach(e => {
  563. lfind = arrayExistObj(this.chargePays, 'payModeId', e.payModeId);
  564. if (lfind > - 1) {
  565. this.chargePays[lfind].chargeMoney = e.backMoeny;
  566. this.chargePays[lfind].cardRegisterId = e.cardRegisterId;
  567. }
  568. });
  569. }
  570. });
  571. },
  572. //待收费数据分析
  573. toCharge(patientRegisterId) {
  574. //默认全部选中
  575. this.selectedData = [...this.asbItemsForFee];
  576. this.$nextTick(function () {
  577. this.selectedData.forEach(row => {
  578. this.$refs['asbItemsForFeeTable'].toggleRowSelection(row)
  579. })
  580. });
  581. this.form.patientRegisterId = patientRegisterId;
  582. },
  583. //根据明细算总价与折扣
  584. sumTotal(details, head) {
  585. let total = 0, totalOri = 0;
  586. details.forEach(e => {
  587. totalOri += Math.round(e.amount * e.chargePriceOri * 100) / 100; //原始实收价格
  588. total += Math.round(e.amount * e.chargePrice * 100) / 100; //当前实收价格
  589. //console.log(total, e.chargePrice, e.amount)
  590. });
  591. total = Math.round(total * 100) / 100;
  592. totalOri = Math.round(totalOri * 100) / 100;
  593. head.total = total;
  594. //head.preTotal = total;
  595. if (totalOri == 0) {
  596. head.discount = 100;
  597. } else {
  598. head.discount = Math.round(10000 * total / totalOri) / 100;
  599. }
  600. //
  601. this.findBalance()
  602. },
  603. //通过折扣计算总价与明细价格
  604. discountToDetails() {
  605. let discount = this.form.discount;
  606. let totalOri = 0, totalCompute = 0, totalPlan = 0;
  607. let lfind = -1;
  608. this.selectedData.forEach(e => {
  609. totalOri += Number(e.amount * e.chargePriceOri); //原始实收价格
  610. lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id)
  611. if (lfind > -1 && e.chargePriceOri != 0) {
  612. e.chargePrice = Math.round(e.chargePriceOri * discount) / 100;
  613. e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100;
  614. totalCompute += Math.round(e.chargePrice * e.amount * 100) / 100;
  615. }
  616. });
  617. totalPlan = Math.round(totalOri * discount) / 100;
  618. this.form.total = totalPlan;
  619. //this.form.preTotal = totalPlan;
  620. //明细和与总金额不符处理
  621. this.handleBalance(totalPlan, totalCompute);
  622. this.findBalance()
  623. },
  624. //通过总价计算折扣与明细价格
  625. totalToDetails() {
  626. let discount = 100;
  627. let totalOri = 0, totalCompute = 0, totalPlan = Number(this.form.total);
  628. let lfind = -1;
  629. this.selectedData.forEach(e => {
  630. totalOri += Math.round(100 * e.amount * e.chargePriceOri) / 100; //原始实收价格
  631. });
  632. if (totalOri != 0) {
  633. discount = Math.round(10000 * totalPlan / totalOri) / 100;
  634. this.form.discount = discount;
  635. }
  636. //
  637. this.selectedData.forEach(e => {
  638. lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id);
  639. if (lfind > -1) {
  640. e.chargePrice = Math.round(e.chargePriceOri * discount) / 100;
  641. e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100;
  642. totalCompute += Math.round(100 * e.chargePrice * e.amount) / 100;
  643. }
  644. });
  645. //this.form.preTotal = totalPlan;
  646. //明细和与总金额不符处理
  647. this.handleBalance(totalPlan, totalCompute);
  648. this.findBalance()
  649. },
  650. //明细合计金额与总金额不一致时,处理
  651. handleBalance(totalPlan, totalCompute) {
  652. if (totalPlan != totalCompute) {
  653. for (let i = this.selectedData.length - 1; i = 0; i--) {
  654. lfind = lfind = arrayExistObj(this.asbItemsForFee, 'id', this.selectedData[i].id);
  655. if (lfind > -1 && this.selectedData[i].amount == 1) {
  656. this.asbItemsForFee[lfind].chargePrice = this.asbItemsForFee[lfind].chargePrice + totalPlan - totalCompute;
  657. this.selectedData[i].chargePrice = this.asbItemsForFee[lfind].chargePrice;
  658. break;
  659. }
  660. }
  661. }
  662. },
  663. //输入预收金额,计算找零
  664. findBalance() {
  665. this.form.balance = Math.round((this.form.preTotal - this.form.total) * 100) / 100;
  666. },
  667. //输入收费方式金额
  668. inputMoney() {
  669. // 现金 id = 01
  670. let cashTotal = Number(0), unCashTotal = Number(0);
  671. this.chargePays.forEach(e => {
  672. console.log('e', e)
  673. if (e.payModeId == '01') {
  674. cashTotal += Number(e.chargeMoney);
  675. } else {
  676. unCashTotal += Number(e.chargeMoney);
  677. }
  678. });
  679. this.form.preTotal = cashTotal + unCashTotal
  680. this.findBalance()
  681. if (unCashTotal > this.form.total) this.$message.warning(`数据校验失败:输入的非现金金额${unCashTotal}不能超过应收金额${this.form.total}`);
  682. },
  683. //勾选要收费的项目
  684. handleSelectionChange(v) {
  685. this.selectedData = v;
  686. this.sumTotal(this.selectedData, this.form);
  687. },
  688. //调整明细折扣
  689. changeDiscount(row) {
  690. let total = this.form.total;
  691. let totalDetailsOri = Math.round(100 * row.amount * row.chargePrice) / 100;
  692. let totalDetailsCur = 0;
  693. row.chargePrice = Math.round(row.discount * row.standardPrice) / 100;
  694. let lfind = arrayExistObj(this.selectedData, 'id', row.id);
  695. if (lfind > -1) {
  696. totalDetailsCur = Math.round(100 * row.amount * row.chargePrice) / 100;
  697. this.form.total = total + totalDetailsCur - totalDetailsOri;
  698. }
  699. this.sumTotal(this.selectedData, this.form);
  700. },
  701. //调整明细实收价格
  702. changePrice(row) {
  703. if (row.chargePriceOri != 0) {
  704. row.discount = Math.round(10000 * row.chargePrice / row.standardPrice) / 100;
  705. }
  706. this.sumTotal(this.selectedData, this.form);
  707. },
  708. //收费
  709. btnCharge() {
  710. let body = {};
  711. let unCashTotal = Number(0), cashTotal = Number(0);
  712. let msg = '';
  713. let chargePays = [];
  714. let asbitems = [];
  715. if (this.form.id) {
  716. this.$message.warning("已收费,不可重复操作!");
  717. return;
  718. }
  719. this.$refs['form'].validate((valid, fields) => {
  720. if (!valid) {
  721. msg = fields[Object.keys(fields)[0]][0].message;
  722. return;
  723. }
  724. });
  725. if (msg) {
  726. this.$message.warning(msg);
  727. return;
  728. }
  729. this.chargePays.forEach(e => {
  730. if (e.payModeId == '01') {
  731. cashTotal += Number(e.chargeMoney);
  732. } else {
  733. unCashTotal += Number(e.chargeMoney);
  734. }
  735. if (e.payModeId == '05' && e.chargeMoney) {
  736. //console.log(e.payModeId,e.chargeMoney,e.cardRegisterId);
  737. if (!e.cardRegisterId) msg = dddw(this.dict.payMode, "id", e.payModeId, "displayName") + '付费,必需选择会员卡号';
  738. } else {
  739. e.cardRegisterId = null;
  740. }
  741. });
  742. if (msg) {
  743. this.$message.warning(msg);
  744. return;
  745. }
  746. //规避套现
  747. if (unCashTotal > this.form.total) {
  748. this.$message.warning("非现金收款不可大于应收金额!");
  749. return;
  750. }
  751. if (unCashTotal + cashTotal < this.form.total) {
  752. this.$message.warning("收费方式合计收款不可小于应收金额!");
  753. return;
  754. }
  755. this.chargePays.forEach(e => {
  756. if (e.chargeMoney) {
  757. if (e.payModeId == '01') {
  758. //现金支付,数据库中存找零后的现金
  759. chargePays.push({
  760. payModeId: e.payModeId,
  761. chargeMoney: e.chargeMoney - this.form.balance,
  762. cardRegisterId: e.cardRegisterId,
  763. });
  764. } else {
  765. chargePays.push({
  766. payModeId: e.payModeId,
  767. chargeMoney: e.chargeMoney,
  768. cardRegisterId: e.cardRegisterId,
  769. });
  770. }
  771. }
  772. });
  773. this.selectedData.forEach(e => {
  774. asbitems.push({
  775. asbitemId: e.asbitemId,
  776. chargePrice: e.chargePrice,
  777. amount: e.amount,
  778. registerAsbitemId: e.id,
  779. });
  780. });
  781. body = {
  782. patientRegisterId: this.form.patientRegisterId,
  783. invoiceNo: this.form.invoiceNo,
  784. invoiceOrgName: this.form.invoiceOrgName,
  785. chargePays,
  786. asbitems,
  787. };
  788. // {
  789. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  790. // "invoiceNo": "string",
  791. // "invoiceOrgName": "string",
  792. // "chargePays": [
  793. // {
  794. // "payModeId": "string",
  795. // "chargeMoney": 0,
  796. // "cardRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  797. // }
  798. // ],
  799. // "asbitems": [
  800. // {
  801. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  802. // "chargePrice": 0,
  803. // "amount": 0,
  804. // "registerAsbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  805. // }
  806. // ]
  807. // }
  808. //console.log('body',body);
  809. postapi('/api/app/registerasbitem/registerasbitemcharge', body).then(res => {
  810. if (res.code != -1) {
  811. this.form.id = res.data.chargeId; //可防止重复提交收费
  812. this.$confirm("操作成功, 是否打印发票?", "提示", {
  813. confirmButtonText: "是",
  814. cancelButtonText: "否",
  815. type: "warning",
  816. }).then(() => {
  817. this.chargePrint('0007', false, res.data.chargeId)
  818. setTimeout(() => {
  819. this.Query();
  820. }, 1000)
  821. }).catch((err) => {
  822. if (err == "cancel") {
  823. //this.$message.info("已取消删除");
  824. this.Query();
  825. }
  826. });
  827. }
  828. });
  829. },
  830. //退费
  831. btnChargeBack() {
  832. let chargeId = this.form.id;
  833. let msg = '';
  834. let chargeBackPays = [];
  835. let total = 0;
  836. let body = {};
  837. if (!chargeId) {
  838. this.$message.warning("请选择待退费的记录!");
  839. return;
  840. }
  841. if (this.form.chargeFlag == '1') {
  842. this.$message.warning("已退费,不可重复操作!");
  843. return;
  844. }
  845. this.$confirm("是否确定执行退费操作?", "提示", {
  846. confirmButtonText: "是",
  847. cancelButtonText: "否",
  848. type: "warning",
  849. }).then(() => {
  850. this.chargePays.forEach(e => {
  851. total += Number(e.chargeMoney);
  852. if (e.payModeId == '05' && e.chargeMoney) {
  853. if (!e.cardRegisterId) msg = '请先择会员卡号';
  854. } else {
  855. e.cardRegisterId = null;
  856. }
  857. return e;
  858. });
  859. if (msg) {
  860. this.$message.warning(msg);
  861. return;
  862. }
  863. if (total != this.form.total) {
  864. this.$message.warning("退费方式合计金额与退费总金额不符");
  865. return;
  866. }
  867. this.chargePays.forEach(e => {
  868. if (e.chargeMoney) {
  869. chargeBackPays.push({
  870. payModeId: e.payModeId,
  871. backMoeny: e.chargeMoney,
  872. cardRegisterId: e.cardRegisterId,
  873. });
  874. }
  875. });
  876. // {
  877. // "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  878. // "chargeBackPays": [
  879. // {
  880. // "payModeId": "string",
  881. // "backMoeny": 0,
  882. // "cardRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  883. // }
  884. // ]
  885. // }
  886. body = {
  887. chargeId, chargeBackPays
  888. }
  889. postapi('/api/app/registerasbitem/registerasbitemchargeback', body).then(res => {
  890. if (res.code != -1) {
  891. console.log("操作成功!");
  892. this.form.chargeFlag = '1'; //防止重复提交退费
  893. this.Query();
  894. }
  895. });
  896. }).catch((err) => {
  897. if (err == "cancel") {
  898. this.$message.info("已取消删除");
  899. }
  900. });
  901. },
  902. //收费打印
  903. chargePrint(ReportCode, isPreview, chargeId) {
  904. console.log('ReportCode, isPreview, chargeId', ReportCode, isPreview, chargeId)
  905. if (!chargeId) {
  906. this.$message.info("人员信息尚未保存,不可执行此操作!");
  907. return;
  908. }
  909. if (!this.$peisAPI) {
  910. this.$message.info("此功能,需要在壳客户端才可运行!")
  911. return
  912. }
  913. let token = window.sessionStorage.getItem('token');
  914. let user = window.sessionStorage.getItem('user');
  915. let toOutShell = {
  916. ReportCode, token,
  917. isBuildImage:'N',
  918. IsUploadPdf:'N',
  919. preViewCanPrint: 'Y',
  920. Parameters: [
  921. { Name: 'printer', Value: user },
  922. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  923. ],
  924. BusinessCode:chargeId,
  925. };
  926. if (isPreview) {
  927. /*
  928. postapi(`/api/app/printreport/getchargereport?ChargeId=${chargeId}`)
  929. .then((res) => {
  930. if (res.code != -1) {
  931. toOutShell.ReportTable = res.data;
  932. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  933. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  934. }
  935. })
  936. .then(res => {
  937. console.log(res)
  938. if (JSON.parse(res).code < 0) {
  939. this.$message.error(JSON.parse(res).message)
  940. }
  941. })
  942. .catch(err => {
  943. this.$message.warning(err);
  944. });
  945. */
  946. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  947. .then(res => {
  948. if (JSON.parse(res).code < 0) {
  949. this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  950. }
  951. })
  952. .catch((err) => {
  953. console.log('打印发票错误', err)
  954. this.$message.warning({ showClose: true, message: `${err}` });
  955. });
  956. } else {
  957. /*
  958. postapi(`/api/app/printreport/getchargereport?ChargeId=${chargeId}`)
  959. .then((res) => {
  960. if (res.code != -1) {
  961. toOutShell.ReportTable = res.data;
  962. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  963. return this.$peisAPI.print(JSON.stringify(toOutShell));
  964. }
  965. })
  966. .then(res => {
  967. console.log(res)
  968. if (JSON.parse(res).code < 0) {
  969. this.$message.error(JSON.parse(res).message)
  970. }
  971. })
  972. .catch(err => {
  973. this.$message.warning(err);
  974. });
  975. */
  976. this.$peisAPI.print(JSON.stringify(toOutShell))
  977. .then(res => {
  978. if (JSON.parse(res).code < 0) {
  979. this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  980. }
  981. })
  982. .catch((err) => {
  983. console.log('打印发票错误', err)
  984. this.$message.warning({ showClose: true, message: `${err}` });
  985. });
  986. }
  987. },
  988. //数据初始化
  989. dictInit() {
  990. this.query.startDate = new Date()
  991. this.query.endDate = this.query.startDate
  992. //性别(仅档案用)
  993. getapi("/api/app/sex").then((res) => {
  994. if (res.code == 1) {
  995. this.dict.sex = res.data;
  996. }
  997. });
  998. //性别(查询)
  999. getapi("/api/app/for-sex").then((res) => {
  1000. if (res.code == 1) {
  1001. this.dict.forSex = res.data;
  1002. }
  1003. });
  1004. //体检单位
  1005. getapi("/api/app/customerorg/getbycodeall").then((res) => {
  1006. this.patientRegister.customerOrgTreeAll = res.data;
  1007. tcdate(this.patientRegister.customerOrgTreeAll)
  1008. });
  1009. //体检中心
  1010. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  1011. (res) => {
  1012. if (res.code == 1) {
  1013. this.dict.organization = res.data;
  1014. }
  1015. }
  1016. );
  1017. //体检单位
  1018. getapi("/api/app/customer-org/in-filter").then((res) => {
  1019. if (res.code == 1) {
  1020. this.dict.customerOrg = res.data;
  1021. }
  1022. });
  1023. //体检类别
  1024. getapi("/api/app/medical-type/in-filter").then((res) => {
  1025. if (res.code == 1) {
  1026. this.dict.medicalType = res.data;
  1027. }
  1028. });
  1029. //人员类别
  1030. getapi("/api/app/personnel-type/in-filter").then((res) => {
  1031. if (res.code == 1) {
  1032. this.dict.personnelType = res.data;
  1033. }
  1034. });
  1035. //婚姻状况
  1036. getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
  1037. if (res.code == 1) {
  1038. this.dict.maritalStatus = res.data;
  1039. }
  1040. });
  1041. //性激素期
  1042. getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
  1043. if (res.code == 1) {
  1044. this.dict.sexHormoneTerm = res.data;
  1045. }
  1046. });
  1047. //民族
  1048. getapi("/api/app/nation/in-filter").then((res) => {
  1049. if (res.code == 1) {
  1050. this.dict.nation = res.data;
  1051. }
  1052. });
  1053. //籍惯 ,出生地
  1054. getapi("/api/app/birth-place/in-filter").then((res) => {
  1055. if (res.code == 1) {
  1056. this.dict.birthPlace = res.data;
  1057. }
  1058. });
  1059. //套餐
  1060. postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
  1061. if (res.code == 1) {
  1062. this.dict.medicalPackage = res.data;
  1063. }
  1064. });
  1065. //分组,所有分组,不限单位,不限次数
  1066. getapi("/api/app/customerorggroup/getlistinfilter").then((res) => {
  1067. if (res.code > -1) {
  1068. this.dict.customerOrgGroupAll = res.data;
  1069. }
  1070. });
  1071. //支付方式 /api/app/pay-mode(全部)
  1072. getapi("/api/app/paymode/getlistinisactive").then((res) => {
  1073. if (res.code == 1) {
  1074. this.dict.payMode = res.data;
  1075. //未收费时
  1076. this.chargePaysInit = [];
  1077. this.dict.payMode.forEach(e => {
  1078. this.chargePaysInit.push({ chargeId: null, payModeId: e.id, chargeMoney: 0, cardBillId: null })
  1079. });
  1080. this.chargePays = deepCopy(this.chargePaysInit);
  1081. }
  1082. });
  1083. //体检类别 树结构
  1084. getapi("/api/app/item-type/by-code-all").then((res) => {
  1085. if (res.code == 1) {
  1086. this.dict.itemTypeTree = res.data;
  1087. tcdate(this.dict.itemTypeTree);
  1088. }
  1089. });
  1090. // postapi("/api/app/asbitem/getasbitemlist", {}).then((res) => {
  1091. // if (res.code == 1) {
  1092. // this.dict.asbItemAll = res.data;
  1093. // }
  1094. // });
  1095. console.log("dict", this.dict);
  1096. },
  1097. },
  1098. //监听事件()
  1099. watch: {
  1100. "dataTransOpts.refresh.charge.S": {
  1101. immediate: true, // 立即执行
  1102. // // deep: true, // 深度监听复杂类型内变化
  1103. handler(newVal, oldVal) {
  1104. console.log(`watch: 收费 newVal: ${newVal}, oldVal: ${oldVal}, 人员条码号: `, this.patientRegisterNo)
  1105. this.query.patientRegisterNo = this.patientRegisterNo
  1106. this.Query("patientRegisterNo")
  1107. }
  1108. },
  1109. },
  1110. };
  1111. </script>
  1112. <style scoped>
  1113. @import '../../assets/css/global_button.css';
  1114. @import '../../assets/css/global_card.css';
  1115. @import '../../assets/css/global_dialog.css';
  1116. @import '../../assets/css/global_form.css';
  1117. @import '../../assets/css/global_input.css';
  1118. @import '../../assets/css/global_table.css';
  1119. @import '../../assets/css/global.css';
  1120. .query {
  1121. margin-left: 5px;
  1122. font-size: 14px;
  1123. color: #232748;
  1124. font-weight: 400;
  1125. font-family: "NotoSansSC-Regular";
  1126. }
  1127. .btnDivClass {
  1128. display: block;
  1129. width: 100px;
  1130. margin-left: 10px;
  1131. }
  1132. .btnListClass {
  1133. margin-top: 10px;
  1134. }
  1135. .btnClass {
  1136. width: 100px;
  1137. }
  1138. :deep .el-form-item--mini.el-form-item,
  1139. .el-form-item--small.el-form-item {
  1140. margin-bottom: 10px;
  1141. }
  1142. </style>