|
|
@@ -5,7 +5,6 @@ import {transformFlatObjectToNested, transformNestedObjectToFlat} from '@/tools/
|
|
|
import {bignumber, chain, multiply} from 'mathjs';
|
|
|
import {
|
|
|
addPrescriptionCore2,
|
|
|
- check,
|
|
|
check2,
|
|
|
getPrescriptionCore2,
|
|
|
getPrescriptionRS,
|
|
|
@@ -24,7 +23,7 @@ export default {
|
|
|
data() {
|
|
|
const locationValidator = (message) => (rule, value, callback) => {
|
|
|
if (this.model.expressExecutor === '顺丰') {
|
|
|
- if (!value.length) { return callback(new Error(message)); }
|
|
|
+ if (!value.length || (typeof value === 'string' && !value.trim())) { return callback(new Error(message)); }
|
|
|
}
|
|
|
callback();
|
|
|
};
|
|
|
@@ -40,10 +39,10 @@ export default {
|
|
|
age: [{required: true, message: '请输入年龄'}],
|
|
|
// recipientTel: [{required: true, message: '请输入联系电话'}],
|
|
|
expressExecutor: [{required: true, message: '请选择配送方式'}],
|
|
|
- consignee: [{validator: locationValidator('请输入收件电话')}],
|
|
|
+ consignee: [{validator: locationValidator('请输入收件人')}],
|
|
|
contactNumber: [{validator: locationValidator('请输入收件电话')}],
|
|
|
// location: [{validator: locationValidator('请选择所属地域')}],
|
|
|
- address: [{required: true, message: '请输入详细地址'}],
|
|
|
+ address: [{validator: locationValidator('请输入详细地址')}],
|
|
|
},
|
|
|
|
|
|
ageOptions: [
|
|
|
@@ -73,6 +72,8 @@ export default {
|
|
|
mechanismOptions: [],
|
|
|
dosageFormOptions: [],
|
|
|
usageOptions: [],
|
|
|
+ // 用法方式
|
|
|
+ usageMethodOptions: [],
|
|
|
concentrationOptions: [],
|
|
|
frequencyOptions: [],
|
|
|
medicationTimeOptions: [],
|
|
|
@@ -81,6 +82,8 @@ export default {
|
|
|
schemeOptions: [],
|
|
|
patternOptions: [],
|
|
|
regionOptions,
|
|
|
+ // 药品标记
|
|
|
+ drugMarkOptions: [],
|
|
|
showPharmacy: false,
|
|
|
searchTableForSystemColumns: [
|
|
|
{title: '名称', data: 'drugsName'},
|
|
|
@@ -142,12 +145,14 @@ export default {
|
|
|
this.getMechanismList();
|
|
|
this.getDicts('dosage_form').then((response) => {this.dosageFormOptions = response.data;});
|
|
|
this.getDicts('pressure_pattern').then((response) => {this.patternOptions = response.data;});
|
|
|
- this.getDicts('prescription.prescriptionUsage').then((response) => {this.usageOptions = response.data;});
|
|
|
+ this.getDicts('prescription_usage').then((response) => {this.usageOptions = response.data;});
|
|
|
this.getDicts('prescription.concentration').then((response) => {this.concentrationOptions = response.data;});
|
|
|
- this.getDicts('prescription.frequency').then((response) => {this.frequencyOptions = response.data;});
|
|
|
- this.getDicts('prescription.medicationTime').then((response) => {this.medicationTimeOptions = response.data;});
|
|
|
- this.getDicts('expressDech').then((response) => {this.expressDechOptions = response.data;});
|
|
|
- this.getDicts('expressPayType').then((response) => {this.expressPayTypeOptions = response.data;});
|
|
|
+ this.getDicts('drug_frequency').then((response) => {this.frequencyOptions = response.data;});
|
|
|
+ this.getDicts('medication_time').then((response) => {this.medicationTimeOptions = response.data;});
|
|
|
+ this.getDicts('express_dech').then((response) => {this.expressDechOptions = response.data;});
|
|
|
+ this.getDicts('express_pay_type').then((response) => {this.expressPayTypeOptions = response.data;});
|
|
|
+ this.getDicts('usage_method').then((response) => {this.usageMethodOptions = response.data;});
|
|
|
+ this.getDicts('drug_mark').then((response) => {this.drugMarkOptions = response.data;});
|
|
|
getSchemeList().then((response) => {this.schemeOptions = response.rows;});
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -219,6 +224,7 @@ export default {
|
|
|
/* 19 处方用法 */ prescription_prescriptionUsage: '',
|
|
|
/* 20 浓煎量 */ prescription_concentration: '',
|
|
|
/* 21 服药频次 */ prescription_frequency: '',
|
|
|
+ /* 用法方式 */ prescription_usageMethod: '',
|
|
|
/* 22 服药时间 */ prescription_medicationTime: '',
|
|
|
/* 23 医嘱 */ prescription_entrust: '',
|
|
|
/* 24 代煎 */ isBehalf: '',
|
|
|
@@ -283,7 +289,7 @@ export default {
|
|
|
model['prescription'].drugs = medicines;
|
|
|
model['prescription'].prescriptionPfSum = +this.medicineWholesalePriceTotal;
|
|
|
model['prescription'].prescriptionYsSum = +this.medicineWholesalePriceTotal;
|
|
|
- model['prescription'].prescriptionSum = +this.medicinePriceTotal;
|
|
|
+ // model['prescription'].prescriptionSum = +this.medicinePriceTotal;
|
|
|
|
|
|
[model.province = '', model.city = '', model.region = ''] = this.model.location;
|
|
|
delete model['location'];
|
|
|
@@ -350,6 +356,7 @@ export default {
|
|
|
delete row.matUnitName;
|
|
|
delete row.matXsj;
|
|
|
delete row.matPfj;
|
|
|
+ delete row.drugMark;
|
|
|
this.medicines.splice(index, 1, row);
|
|
|
}
|
|
|
if (this.getEmptyMedicineRowIndex === -1) this.appendMedicine({}, index + 1);
|
|
|
@@ -566,23 +573,36 @@ export default {
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="服药频次" prop="prescription_frequency">
|
|
|
- <el-select v-model="model.prescription_frequency" placeholder="请选择服药频次" clearable>
|
|
|
- <el-option v-for="item in frequencyOptions" :key="item.dictValue"
|
|
|
- :label="item.dictLabel" :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="服药时间" prop="prescription_medicationTime">
|
|
|
- <el-select v-model="model.prescription_medicationTime" placeholder="请选择服药时间" clearable>
|
|
|
- <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
|
|
|
- :label="item.dictLabel" :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="服药频次" prop="prescription_frequency">
|
|
|
+ <el-select v-model="model.prescription_frequency" placeholder="请选择服药频次" clearable>
|
|
|
+ <el-option v-for="item in frequencyOptions" :key="item.dictValue"
|
|
|
+ :label="item.dictLabel" :value="item.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="用法方式" prop="prescription_usageMethod">
|
|
|
+ <el-select v-model="model.prescription_usageMethod" placeholder="请选择用法方式" clearable>
|
|
|
+ <el-option v-for="item in usageMethodOptions" :key="item.dictValue"
|
|
|
+ :label="item.dictLabel" :value="item.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="服药时间" prop="prescription_medicationTime">
|
|
|
+ <el-select v-model="model.prescription_medicationTime" placeholder="请选择服药时间" clearable>
|
|
|
+ <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
|
|
|
+ :label="item.dictLabel" :value="item.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-col>
|
|
|
<el-col v-if="showPharmacy" :span="8">
|
|
|
<el-form-item label="药房" prop="yfId">
|
|
|
@@ -840,6 +860,15 @@ export default {
|
|
|
@input="updateMedicine(scope.row, scope.$index)"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="标记" prop="drugMark" width="110px" align="center">
|
|
|
+ <template slot-scope="scope" v-if="scope.row.matCode">
|
|
|
+ <el-select v-model="scope.row.drugMark" placeholder="" clearable :disabled="saving">
|
|
|
+ <el-option v-for="item in drugMarkOptions" :key="item.dictValue"
|
|
|
+ :label="item.dictLabel" :value="item.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="批发价" prop="matPfj" width="110" align="center"></el-table-column>
|
|
|
<el-table-column label="零售价" prop="matXsj" width="110" align="center"></el-table-column>
|
|
|
<el-table-column label="小计" prop="subtotalMoney" width="110" align="center"></el-table-column>
|