| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -21,7 +21,7 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div style="display:flex;margin-top:10px;"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-radio v-model="query.chargeFlag" label="N">未收费</el-radio> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-radio v-model="query.chargeFlag" label="Y">已收费</el-radio> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-radio v-model="query.chargeFlag" label="B">退费</el-radio> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-radio v-model="query.chargeFlag" label="B">已退费</el-radio> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          <!-- 列表 --> | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -211,7 +211,7 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <div style="margin-top:5px;font-size:10px;">收费方式:</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-table :data="chargePays" border highlight-current-row size="small" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                :height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112" > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                :height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="payModeId" label="收费方式" width="180"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -219,13 +219,13 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="chargeMoney" label="金额"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-input type="number" v-model="scope.row.chargeMoney" size="small"  @input="inputMoney" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template>                   | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-input type="number" v-model="scope.row.chargeMoney" size="small" @input="inputMoney" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="cardBillId" label="会员卡"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-select v-model="scope.row.cardBillId" placeholder="请选择" size="small" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      filterable clearable :disabled="scope.row.payModeId == '05' ? false:true"  > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-select v-model="scope.row.cardBillId" placeholder="请选择" size="small" filterable clearable | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      :disabled="scope.row.payModeId == '05' ? false : true"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      <el-option v-for="item in cardRegister" :key="item.id" :label="item.idNo" :value="item.id" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </el-select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -236,14 +236,16 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <div style="margin-top:5px; font-size:10px;">待收费项目:</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-table :data="asbItemsForFee" border highlight-current-row | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                :height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112"  | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                size="small" @selection-change="handleSelectionChange"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                :height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112" size="small" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                @selection-change="handleSelectionChange" ref="asbItemsForFeeTable"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column type="selection" align="center" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column label="已选组合项目" width="120" prop="asbitemName" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column label="标准价格" prop="standardPrice" width="80" align="center" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column label="折扣" prop="discount" width="60"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-input type="number" v-model="scope.row.discount" size="small" @input="changeDiscount(scope.$index)"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-input type="number" v-model="scope.row.discount" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      :disabled="scope.row.isCharge == 'Y' ? true : false" size="small" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      @input="changeDiscount(scope.row)" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column label="数量" prop="amount" width="50"> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -253,8 +255,8 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column label="实收价格" prop="chargePrice" width="80"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-input type="number" v-model="patientRegister.patientRegisterAbs[scope.$index].chargePrice" size="small" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      @input="changePrice(scope.$index)" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <el-input type="number" v-model="scope.row.chargePrice" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      :disabled="scope.row.isCharge == 'Y' ? true : false" size="small" @input="changePrice(scope.row)" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="total" label="金额" width="70" v-if="false" /> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -265,29 +267,31 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      <el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </el-select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column>                 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="checkCompleteFlag" label="状态" align="center"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div>{{ ldddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div>{{ dddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column>                 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="creatorName" label="登记人" align="center"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="creationTime" label="登记日期" width="90" align="center"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              </el-table> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <div>{{ moment(scope.row.creationTime, 'yyyy-MM-DD') }}</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="creatorName" label="登记人" align="center" /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <el-table-column prop="creationTime" label="登记日期" width="90" align="center"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  <template slot-scope="scope"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div>{{ moment(scope.row.creationTime, 'yyyy-MM-DD') }}</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  </template> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </el-table-column> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              </el-table> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div class="btnDivClass"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          <div class="btnListClass"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="primary" class="btnClass">收费</el-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="primary" class="btnClass" @click="charge" :disabled="query.chargeFlag == 'N' ? false:true">收费</el-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          <div class="btnListClass"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="danger" class="btnClass" @click="chargeBack" :disabled="query.chargeFlag == 'Y' ? false:true">退费</el-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          <div class="btnListClass"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="primary" class="btnClass">打印</el-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="success" class="btnClass" @click="chargePrint('0007', false, form.id)" :disabled="query.chargeFlag == 'B' ? true:false">打印</el-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      </div> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -298,7 +302,7 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import moment from 'moment'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { mapState, mapActions } from "vuex"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { getapi, postapi, putapi, deletapi } from "@/api/api"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { tcdate, dddw } from "../../utlis/proFunc"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { tcdate, dddw, arrayExistObj } from "../../utlis/proFunc"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import PatientRegisterRefuseList from "../../components/patientRegister/PatientRegisterRefuseList.vue"; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -311,7 +315,17 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  data() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    return { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      query: { chargeFlag: 'N' },//查询条件 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      form: {},  //收费主表 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      form: { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        id: null, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        patientRegisterId: null, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        invoiceNo: '', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        invoiceOrgName: '', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        chargeFlag: '1', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        discount: 0, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        total: 0,  //应收金额 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        preTotal: 0,  //预收金额 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        balance: 0,  //找零 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      },  //收费主表 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      rules: { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        invoiceNo: [ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          { required: true, message: "请填写发票/收据号", trigger: "blur" }, | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -354,9 +368,9 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      chargePays: [],  //收支方式 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      asbItemsForFee: [],  //待收费项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      cardRegister:[{id:'00000000-0000-0000-0000-000000000000',idNo:'0001'}],      //当前客户的会员卡 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      cardRegisterAll:[],   //所有客户的会员卡 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      selectedData: [],    //选中项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      cardRegister: [{ id: '00000000-0000-0000-0000-000000000000', idNo: '0001' }],      //当前客户的会员卡 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      cardRegisterAll: [],   //所有客户的会员卡 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -374,7 +388,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  methods: { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ...mapActions(["getCustomerOrgGroup"]), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    dddw,moment, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    dddw, moment, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //查询人员列表数据 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    Query() { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -382,30 +396,320 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //人员列表点击 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    rowClick(row){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    rowClick(row) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.getAsbItemsForFee(row.patientRegisterId, row.chargeId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //获取项目列表 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async getAsbItemsForFee(patientRegisterId, chargeId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //待收费项目列表       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.asbItemsForFee = []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (this.query.chargeFlag = 'N') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${patientRegisterId}`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then(res => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.asbItemsForFee = res.data; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.asbItemsForFee.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.chargePriceOri = e.chargePrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.standTotal = e.amount * e.standardPrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.total = e.amount * e.chargePrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.toCharge(patientRegisterId, chargeId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //已收费项目列表 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${chargeId}`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then(res => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.asbItemsForFee = res.data; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //输入收费方式金额 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    inputMoney(){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //待收费数据分析 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    toCharge() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //默认全部选中 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData = this.asbItemsForFee; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.$nextTick(function () { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // let rows = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // for (let m = 0; m < this.selectedData.length; m++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //   for (let n = 0; n < this.tableData.length; n++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //     if (this.selectedData[m].id === this.tableData[n].id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //       rows.push(this.tableData[n]) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //     } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //   } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.selectedData.forEach(row => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$refs['asbItemsForFeeTable'].toggleRowSelection(row) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.form.patientRegisterId = patientRegisterId; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //根据明细算总价与折扣 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    sumTotal() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let total = Number(0), totalOri = Number(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        totalOri += Number(e.amount * e.chargePriceOri);  //原始实收价格 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        total += Number(e.amount * e.chargePrice);      //当前实收价格 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.form.total = total; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (totalOri == 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.form.discount = 100; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.form.discount = Math.round(total / totalOri, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //勾选要收费的项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    handleSelectionChange(){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //通过折扣计算总价与明细价格 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    discountToDetails() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let discount = this.form.discount; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let totalOri = Number(0), totalCompute = Number(0), totalPlan = Number(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lfind = -1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        totalOri += Number(e.amount * e.chargePriceOri);  //原始实收价格 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (lfind > -1 && e.chargePriceOri != 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.asbItemsForFee[lfind].discount = discount; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.asbItemsForFee[lfind].chargePrice = Math.round(e.chargePriceOri * discount, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          totalCompute += Number(this.asbItemsForFee[lfind].chargePrice * e.amount); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      totalPlan = Math.round(totalOri * discount, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.form.total = totalPlan; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //明细和与总金额不符处理 (其实不处理亦无关系) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.handleBalance(totalPlan, totalCompute); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //通过折扣计算总价与明细价格 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    totalToDetails() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let discount = 0; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let totalOri = Number(0), totalCompute = Number(0), totalPlan = Number(this.form.total); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lfind = -1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        totalOri += Number(e.amount * e.chargePriceOri);  //原始实收价格         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      discount = Math.round(totalPlan / totalOri, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (lfind > -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.asbItemsForFee[lfind].chargePrice = Math.round(this.asbItemsForFee[lfind].chargePrice * discount, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          totalCompute += this.asbItemsForFee[lfind].chargePrice * e.amount; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //明细和与总金额不符处理 (其实不处理亦无关系) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.handleBalance(totalPlan, totalCompute); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //明细合计金额与总金额不一致时,处理 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    handleBalance(totalPlan, totalCompute) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (totalPlan != totalCompute) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        for (let i = this.selectedData.length - 1; i = 0; i--) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          lfind = lfind = arrayExistObj(this.asbItemsForFee, 'id', this.selectedData[i].id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (lfind > -1 && this.selectedData[i].amount == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.asbItemsForFee[lfind].chargePrice = this.asbItemsForFee[lfind].chargePrice + totalPlan - totalCompute; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.selectedData[i].chargePrice = this.asbItemsForFee[lfind].chargePrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            break; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //输入收费方式金额 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    inputMoney() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let total = Number(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.chargePays.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        total += Number(e.chargeMoney); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (total > this.form.total) this.$message.warning("输入金额超过总金额"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //勾选要收费的项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    handleSelectionChange(v) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData = v; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.sumTotal(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //调整明细折扣 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    changeDiscount(row){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    changeDiscount(row) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let total = this.form.total; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let totalDetailsOri = row.amount * row.chargePrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let totalDetailsCur = Number(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      row.chargePrice = Math.round(row.discount * row.chargePriceOri, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lfind = arrayExistObj(this.selectedData, 'id', row.id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (lfind > -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        totalDetailsCur = row.amount * row.chargePrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.form.total = total + totalDetailsCur - totalDetailsOri; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //调整明细实收价格 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    changePrice(row){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    changePrice(row) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (row.chargePriceOri != 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        row.discount = Math.round(row.chargePrice / row.chargePriceOri, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      row.chargePrice = Math.round(row.discount * row.chargePriceOri, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lfind = arrayExistObj(this.selectedData, 'id', row.id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (lfind > -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.selectedData[lfind].discount = row.discount; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.selectedData[lfind].chargePrice = row.chargePrice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.sumTotal(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //收费 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    charge() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let total = Number(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let msg = ''; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let form = {}; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let chargePays = []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let chargeAsbitem = []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.chargePays.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        total += Number(e.chargeMoney); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (e.payModeId == '05') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (!e.cardBillId) msg = '请先择会员卡号'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.cardBillId = null; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return e; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message.warning(msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (total != this.form.total) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message.warning("收费方式合计金额与收费总金额不符"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.$refs[form].validate((valid) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!valid) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$message.warning("数据未通过校验!"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.chargePays.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (e.chargeMoney) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          chargePays.push(e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      form = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        patientRegisterId: this.form.patientRegisterId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        invoiceNo: this.form.invoiceNo, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        invoiceOrgName: this.form.invoiceOrgName, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        chargeFlag: this.form.chargeFlag, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.selectedData.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        chargeAsbitem.push({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          asbitemId: e.asbitemId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          chargePrice: e.chargePrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          amount: e.amount, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          registerAsbitemId: e.id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //退费 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    chargeBack() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let chargeId = this.form.id; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let msg = ''; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let chargeBackPays = []; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.chargePays.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        total += Number(e.chargeMoney); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (e.payModeId == '05') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (!e.cardBillId) msg = '请先择会员卡号'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.cardBillId = null; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return e; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message.warning(msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (total != this.form.total) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message.warning("退费方式合计金额与退费总金额不符"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.chargePays.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (e.chargeMoney) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          chargeBackPays.push(e); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //收费打印 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    chargePrint(ReportCode, isPreview, chargeId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (chargeId.length < 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message.info("人员信息尚未保存,不可执行此操作!"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let token = localStorage.getItem('token'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let user = localStorage.getItem('user'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let toOutShell = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ReportCode, token, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        preViewCanPrint: 'Y', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Parameters: [ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          { Name: 'printer', Value: user }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          { Name: 'hisLog', Value: 'pic/hisLog.jpg' }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (isPreview) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${chargeId}`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              toOutShell.ReportTable = res.data; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              return this.$peisAPI.printPre(JSON.stringify(toOutShell)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .catch(err => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.$message.warning(err); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${chargeId}`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              toOutShell.ReportTable = res.data; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              return this.$peisAPI.print(JSON.stringify(toOutShell)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .catch(err => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.$message.warning(err); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //数据初始化 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    dictInit() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -551,6 +855,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  padding-left: 5px; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  padding-right: 15px; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					::v-deep input[type="number"]::-webkit-inner-spin-button, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					input[type="number"]::-webkit-outer-spin-button { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  -webkit-appearance: none !important; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |