|
@@ -32,9 +32,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.classifyId">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="chooseFourClass"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -107,9 +104,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.unitId">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="chooseUnit"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -129,9 +123,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.manufacturerId">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="chooseFactory"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -158,9 +149,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.originPlace">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test01"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -356,9 +344,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.materialRate">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test01"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -397,9 +382,6 @@
|
|
:value="item.code"
|
|
:value="item.code"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.puPersonnelId">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test01"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -458,16 +440,14 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm.businessLine">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test01"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="物料申请人" prop="proposerId">
|
|
<el-form-item label="物料申请人" prop="proposerId">
|
|
- <el-input :disabled="disable" v-model="basicForm.proposerId"></el-input>
|
|
|
|
|
|
+ <el-input disabled v-model="this.$store.state.user.nickName"></el-input>
|
|
|
|
+ <el-input v-show="false" v-model="basicForm.proposerId"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -534,7 +514,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input disabled v-model="basicForm.purchasingOrganization"></el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -554,7 +533,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled = "disable || orgControl" v-model="basicForm.businessDepartment"></el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -570,6 +548,42 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-row style="margin-bottom: 12px;">
|
|
|
|
+ <span>物料类别</span>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row style="margin-bottom: 12px;">
|
|
|
|
+ <el-button :disabled="disable" type="primary" size="small" plain @click="addLine">新增</el-button>
|
|
|
|
+ <el-button :disabled="disable" type="primary" size="small" plain @click="handleDelete">删除</el-button>
|
|
|
|
+ <!-- <el-button :disabled="disable || isControl" type="primary" size="small" plain @click="testsave">暂存</el-button> -->
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="sysMaterialMedcineItemApply"
|
|
|
|
+ class="request-table"
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
|
+ <el-table-column label="物料类别ID" align="center" prop="sort">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input readonly v-model="scope.row.drugId">
|
|
|
|
+ <!-- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="chooseDrug"></el-button> -->
|
|
|
|
+ </el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="物料类别code" align="center" prop="medicineCode">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input readonly v-model="scope.row.drugCode"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="物料类别名称" align="center" prop="medicineName">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input readonly v-model="scope.row.drugName"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
@@ -645,9 +659,6 @@
|
|
:value="item.id"
|
|
:value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <!-- <el-input :disabled="disable" v-model="basicForm2.dosageFrom">
|
|
|
|
- <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test01"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -676,40 +687,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
- <!-- <el-row style="margin-bottom: 12px;">
|
|
|
|
- <span>物料类别</span>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row style="margin-bottom: 12px;">
|
|
|
|
- <el-button type="primary" size="small" plain @click="addLine">新增</el-button>
|
|
|
|
- <el-button type="primary" size="small" plain @click="handleDelete">删除</el-button>
|
|
|
|
- <el-button type="primary" size="small" plain @click="testsave">暂存</el-button>
|
|
|
|
- </el-row> -->
|
|
|
|
- <!-- <el-row>
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-table
|
|
|
|
- :data="basicForm2.medicineTypeChanges"
|
|
|
|
- class="request-table"
|
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
- >
|
|
|
|
- <el-table-column type="selection" width="55" />
|
|
|
|
- <el-table-column label="序号" align="center" prop="sort">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-input v-model="scope.row.sort"></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="物料类别" align="center" prop="medicineCode">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-input v-model="scope.row.medicineCode"></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="类别名称" align="center" prop="medicineName">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-input v-model="scope.row.medicineName"></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row> -->
|
|
|
|
|
|
+
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane label="单据信息" name="fourth">
|
|
<el-tab-pane label="单据信息" name="fourth">
|
|
@@ -793,13 +771,6 @@
|
|
</el-col>
|
|
</el-col>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <popDialog
|
|
|
|
- ref="contractSelect"
|
|
|
|
- @doSubmit="selectionsToInput"
|
|
|
|
- :selectData="selectData"
|
|
|
|
- :single="true"
|
|
|
|
- />
|
|
|
|
-
|
|
|
|
<factory
|
|
<factory
|
|
ref="factory"
|
|
ref="factory"
|
|
@doSubmit="acceptFactory"
|
|
@doSubmit="acceptFactory"
|
|
@@ -869,11 +840,18 @@
|
|
:selectData="selectData11"
|
|
:selectData="selectData11"
|
|
:single="true"
|
|
:single="true"
|
|
/>
|
|
/>
|
|
|
|
+
|
|
|
|
+ <drug
|
|
|
|
+ ref="drug"
|
|
|
|
+ @doSubmit="acceptDrug"
|
|
|
|
+ :selectData="selectData12"
|
|
|
|
+ :single="true"
|
|
|
|
+ />
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import popDialog from '@/components/PopDialog/index.vue'
|
|
|
|
import factory from '@/components/PopDialog/productFactory.vue'
|
|
import factory from '@/components/PopDialog/productFactory.vue'
|
|
import fourClass from '@/components/PopDialog/fourClass.vue'
|
|
import fourClass from '@/components/PopDialog/fourClass.vue'
|
|
import unit from '@/components/PopDialog/unit.vue'
|
|
import unit from '@/components/PopDialog/unit.vue'
|
|
@@ -882,9 +860,12 @@ import tax from '@/components/PopDialog/tax.vue'
|
|
import staff from '@/components/PopDialog/staff.vue'
|
|
import staff from '@/components/PopDialog/staff.vue'
|
|
import serviceline from '@/components/PopDialog/serviceline.vue'
|
|
import serviceline from '@/components/PopDialog/serviceline.vue'
|
|
import dose from '@/components/PopDialog/dose.vue'
|
|
import dose from '@/components/PopDialog/dose.vue'
|
|
|
|
+// 公用一个树形(组织部门传值不同)
|
|
import orgs from '@/components/PopDialog/organization.vue'
|
|
import orgs from '@/components/PopDialog/organization.vue'
|
|
import depart from '@/components/PopDialog/organization.vue'
|
|
import depart from '@/components/PopDialog/organization.vue'
|
|
-// 公用一个树形
|
|
|
|
|
|
+// 药品类别子别
|
|
|
|
+import drug from '@/components/PopDialog/drug.vue'
|
|
|
|
+
|
|
import { addReq, getReqDetail, editReq } from '@/api/requisition/basic'
|
|
import { addReq, getReqDetail, editReq } from '@/api/requisition/basic'
|
|
// 调用物料分类详情接口用于数据回显
|
|
// 调用物料分类详情接口用于数据回显
|
|
import { getDetail } from '@/api/classify/basic';
|
|
import { getDetail } from '@/api/classify/basic';
|
|
@@ -897,7 +878,6 @@ export default {
|
|
name: 'requisition_add',
|
|
name: 'requisition_add',
|
|
dicts: ['sys_storage_condition', 'sys_conditions_carriage', 'sys_medicine', 'medical_instruments', 'curing_type', 'period_unit', 'expiry_date'],
|
|
dicts: ['sys_storage_condition', 'sys_conditions_carriage', 'sys_medicine', 'medical_instruments', 'curing_type', 'period_unit', 'expiry_date'],
|
|
components: {
|
|
components: {
|
|
- popDialog,
|
|
|
|
factory,
|
|
factory,
|
|
fourClass,
|
|
fourClass,
|
|
unit,
|
|
unit,
|
|
@@ -907,7 +887,8 @@ export default {
|
|
serviceline,
|
|
serviceline,
|
|
dose,
|
|
dose,
|
|
orgs,
|
|
orgs,
|
|
- depart
|
|
|
|
|
|
+ depart,
|
|
|
|
+ drug
|
|
},
|
|
},
|
|
props: ['pageStu', 'row', 'disable'],
|
|
props: ['pageStu', 'row', 'disable'],
|
|
model: {
|
|
model: {
|
|
@@ -1048,6 +1029,8 @@ export default {
|
|
// medicineTypeChanges:[
|
|
// medicineTypeChanges:[
|
|
// ],
|
|
// ],
|
|
},
|
|
},
|
|
|
|
+ // 医药属性子表
|
|
|
|
+ sysMaterialMedcineItemApply: [],
|
|
|
|
|
|
// tableList: [],
|
|
// tableList: [],
|
|
// 子表选中
|
|
// 子表选中
|
|
@@ -1064,7 +1047,8 @@ export default {
|
|
selectData8: [],
|
|
selectData8: [],
|
|
selectData9: [],
|
|
selectData9: [],
|
|
selectData10: [],
|
|
selectData10: [],
|
|
- selectData11: []
|
|
|
|
|
|
+ selectData11: [],
|
|
|
|
+ selectData12: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// watch: {
|
|
// watch: {
|
|
@@ -1098,11 +1082,8 @@ export default {
|
|
// alert('详情页面:')
|
|
// alert('详情页面:')
|
|
console.log('页面状态',this.pageStu)
|
|
console.log('页面状态',this.pageStu)
|
|
console.log('数据', this.row)
|
|
console.log('数据', this.row)
|
|
|
|
+ console.log('取VUEX里面的数据:', this.$store.state.user.name)
|
|
this.getDetails(this.row)
|
|
this.getDetails(this.row)
|
|
- // 获取树形详情
|
|
|
|
- if (this.row.classifyId) {
|
|
|
|
- this.getTreeDetails(this.row.classifyId)
|
|
|
|
- }
|
|
|
|
// 生产厂家代理人用于回显
|
|
// 生产厂家代理人用于回显
|
|
if (this.row.manufacturerId) {
|
|
if (this.row.manufacturerId) {
|
|
this.getFactoryDetails(this.row.manufacturerId)
|
|
this.getFactoryDetails(this.row.manufacturerId)
|
|
@@ -1144,10 +1125,6 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.isControl = true
|
|
this.isControl = true
|
|
}
|
|
}
|
|
- // 获取树形详情
|
|
|
|
- if (this.row.classifyId) {
|
|
|
|
- this.getTreeDetails(this.row.classifyId)
|
|
|
|
- }
|
|
|
|
// 生产厂家代理人用于回显
|
|
// 生产厂家代理人用于回显
|
|
if (this.row.manufacturerId) {
|
|
if (this.row.manufacturerId) {
|
|
this.getFactoryDetails(this.row.manufacturerId)
|
|
this.getFactoryDetails(this.row.manufacturerId)
|
|
@@ -1300,6 +1277,10 @@ export default {
|
|
console.log('res',res)
|
|
console.log('res',res)
|
|
if(res.code === 200) {
|
|
if(res.code === 200) {
|
|
this.basicForm = res.data
|
|
this.basicForm = res.data
|
|
|
|
+ // 获取树形详情
|
|
|
|
+ if (res.data.classifyId) {
|
|
|
|
+ this.getTreeDetails(res.data.classifyId)
|
|
|
|
+ }
|
|
if(res.data.purchasingOrganization) {
|
|
if(res.data.purchasingOrganization) {
|
|
this.basicForm.purchasingOrganization = res.data.purchasingOrganization
|
|
this.basicForm.purchasingOrganization = res.data.purchasingOrganization
|
|
this.getOrgDetails(res.data.purchasingOrganization)
|
|
this.getOrgDetails(res.data.purchasingOrganization)
|
|
@@ -1319,63 +1300,97 @@ export default {
|
|
if (res.data.sysMaterialMedcineApply && res.data.sysMaterialMedcineApply.dosageFrom) {
|
|
if (res.data.sysMaterialMedcineApply && res.data.sysMaterialMedcineApply.dosageFrom) {
|
|
this.getDoseDetails(res.data.sysMaterialMedcineApply.dosageFrom)
|
|
this.getDoseDetails(res.data.sysMaterialMedcineApply.dosageFrom)
|
|
}
|
|
}
|
|
|
|
+ // 物料类别回显
|
|
|
|
+ if (res.data.sysMaterialMedcineItemApply) {
|
|
|
|
+ this.sysMaterialMedcineItemApply = res.data.sysMaterialMedcineItemApply
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
save() {
|
|
save() {
|
|
if(this.pageStu == 'edit') {
|
|
if(this.pageStu == 'edit') {
|
|
|
|
+ // 申请人取默认值
|
|
|
|
+ this.basicForm.proposerId = this.$store.state.user.name
|
|
let sparams = {...this.basicForm, ...{status: 0}}
|
|
let sparams = {...this.basicForm, ...{status: 0}}
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
console.log('提交参数', sparams)
|
|
console.log('提交参数', sparams)
|
|
this.$refs['basic'].validate((valid) => {
|
|
this.$refs['basic'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- editReq(sparams).then(res => {
|
|
|
|
- if(res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success'
|
|
|
|
- });
|
|
|
|
- this.back()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.sysMaterialMedcineItemApply.length !== 0) {
|
|
|
|
+ editReq(sparams).then(res => {
|
|
|
|
+ if(res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ this.back()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请维护物料类别后再提交',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
// alert('保存传status:0')
|
|
// alert('保存传status:0')
|
|
|
|
+ // 申请人取默认值
|
|
|
|
+ this.basicForm.proposerId = this.$store.state.user.name
|
|
let sparams = {...this.basicForm, ...{status: 0}}
|
|
let sparams = {...this.basicForm, ...{status: 0}}
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
console.log('保存参数', sparams)
|
|
console.log('保存参数', sparams)
|
|
this.$refs['basic'].validate((valid) => {
|
|
this.$refs['basic'].validate((valid) => {
|
|
if(valid) {
|
|
if(valid) {
|
|
- addReq(sparams).then(res => {
|
|
|
|
- if(res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success'
|
|
|
|
- });
|
|
|
|
- this.back()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.sysMaterialMedcineItemApply.length !== 0) {
|
|
|
|
+ addReq(sparams).then(res => {
|
|
|
|
+ if(res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ this.back()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请维护物料类别后再提交',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
submit() {
|
|
submit() {
|
|
// alert('提交传status:1')
|
|
// alert('提交传status:1')
|
|
|
|
+ // 申请人取默认值
|
|
|
|
+ this.basicForm.proposerId = this.$store.state.user.name
|
|
let sparams = {...this.basicForm, ...{status: 1}}
|
|
let sparams = {...this.basicForm, ...{status: 1}}
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
console.log('提交参数', sparams)
|
|
console.log('提交参数', sparams)
|
|
this.$refs['basic'].validate((valid) => {
|
|
this.$refs['basic'].validate((valid) => {
|
|
if(valid) {
|
|
if(valid) {
|
|
- editReq(sparams).then(res => {
|
|
|
|
- if(res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success'
|
|
|
|
- });
|
|
|
|
- this.back()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.sysMaterialMedcineItemApply.length !== 0) {
|
|
|
|
+ editReq(sparams).then(res => {
|
|
|
|
+ if(res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ this.back()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请维护物料类别后再提交',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1388,78 +1403,43 @@ export default {
|
|
this.$emit('refresh', queryParams)
|
|
this.$emit('refresh', queryParams)
|
|
},
|
|
},
|
|
// 子表增删行
|
|
// 子表增删行
|
|
- // handleSelectionChange(val) {
|
|
|
|
- // this.ids = val
|
|
|
|
- // console.log('this.ids',this.ids)
|
|
|
|
- // },
|
|
|
|
- // addLine() {
|
|
|
|
- // //添加行数
|
|
|
|
- // let newValue = {
|
|
|
|
- // sort:'',
|
|
|
|
- // medicineCode: '',
|
|
|
|
- // medicineName: '',
|
|
|
|
- // };
|
|
|
|
- // this.basicForm2.medicineTypeChanges.push(newValue);
|
|
|
|
- // },
|
|
|
|
- // handleDelete(index) {
|
|
|
|
- // if(this.ids.length == 0) {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: '请选择删除条目',
|
|
|
|
- // type: 'warning'
|
|
|
|
- // });
|
|
|
|
- // } else {
|
|
|
|
- // // console.log('index',index)
|
|
|
|
- // // this.basicForm2.medicineTypeChanges.splice(index, 1);
|
|
|
|
- // this.basicForm2.medicineTypeChanges = this.basicForm2.medicineTypeChanges.filter(item =>
|
|
|
|
- // !this.ids.some(ele =>
|
|
|
|
- // ele.sort == item.sort))
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // testsave() {
|
|
|
|
- // console.log('暂存表格:', this.basicForm2.medicineTypeChanges)
|
|
|
|
- // console.log('暂存表单1', this.basicForm)
|
|
|
|
- // let params = {...this.basicForm, ...this.basicForm2}
|
|
|
|
- // console.log('暂存总表单', params)
|
|
|
|
- // },
|
|
|
|
- // 设置选中
|
|
|
|
- selectionsToInput (selections) {
|
|
|
|
- console.log('父组件拿到的:', selections)
|
|
|
|
- this.selectData = selections
|
|
|
|
- this.$emit('getInfo', this.selectData)
|
|
|
|
- getMaterialDetails(selections[0].id).then(res => {
|
|
|
|
- console.log('res',res)
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- let data = res.data.data
|
|
|
|
- // 物料id
|
|
|
|
- this.basicForm.materialId = data.id
|
|
|
|
- // 物料分类Id
|
|
|
|
- this.basicForm.materialClassifyId = data.classifyId
|
|
|
|
- this.basicForm.materialCode = data.code
|
|
|
|
- this.basicForm.materialName = data.name
|
|
|
|
- this.basicForm.medicineMaterial = data.isMedicine
|
|
|
|
- this.basicForm.oneClass = data.oneClass
|
|
|
|
- this.basicForm.twoClass = data.twoClass
|
|
|
|
- this.basicForm.threeClass = data.threeClass
|
|
|
|
- this.basicForm.fourClass = data.fourClass
|
|
|
|
- this.basicForm.specification = data.specification
|
|
|
|
- this.basicForm.model = data.model
|
|
|
|
- this.basicForm.registrant = data.registrant
|
|
|
|
- this.basicForm.storageConditions = data.storageCondition
|
|
|
|
- this.basicForm.transportCondition = data.transportationCondition
|
|
|
|
- this.basicForm.remark = data.deliveryPeriod
|
|
|
|
- if(data.medcines.length !== 0) {
|
|
|
|
- this.basicForm2.drug = data.medcines[0].isDrug
|
|
|
|
- this.basicForm2.registrationNo = data.medcines[0].registrationNo
|
|
|
|
- this.basicForm2.medicalDevices = data.medcines[0].medicalInstruments
|
|
|
|
- this.basicForm2.maintenanceType = data.medcines[0].curingType
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
+ this.ids = val
|
|
|
|
+ console.log('this.ids',this.ids)
|
|
},
|
|
},
|
|
- test01() {
|
|
|
|
- console.log('测试点击')
|
|
|
|
- this.$refs.contractSelect.init()
|
|
|
|
|
|
+ addLine() {
|
|
|
|
+ //添加行数
|
|
|
|
+ // let newValue = {
|
|
|
|
+ // drugId:'',
|
|
|
|
+ // drugCode: '',
|
|
|
|
+ // drugName: '',
|
|
|
|
+ // };
|
|
|
|
+ // this.sysMaterialMedcineItemApply.push(newValue);
|
|
|
|
+ this.chooseDrug()
|
|
},
|
|
},
|
|
|
|
+ handleDelete(index) {
|
|
|
|
+ if(this.ids.length == 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择删除条目',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ // console.log('index',index)
|
|
|
|
+ // this.basicForm2.medicineTypeChanges.splice(index, 1);
|
|
|
|
+ this.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply.filter(item =>
|
|
|
|
+ !this.ids.some(ele =>
|
|
|
|
+ ele.drugId == item.drugId))
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ testsave() {
|
|
|
|
+ console.log('暂存表格:', this.sysMaterialMedcineItemApply)
|
|
|
|
+ console.log('暂存表单1', this.basicForm)
|
|
|
|
+ let params = {...this.basicForm}
|
|
|
|
+ params.sysMaterialMedcineApply = this.basicForm2
|
|
|
|
+ params.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
|
|
+ console.log('暂存总表单', params)
|
|
|
|
+ },
|
|
|
|
+
|
|
// 选择生产厂家/代理人
|
|
// 选择生产厂家/代理人
|
|
acceptFactory (selections) {
|
|
acceptFactory (selections) {
|
|
console.log('选择的数据',selections)
|
|
console.log('选择的数据',selections)
|
|
@@ -1576,7 +1556,20 @@ export default {
|
|
chooseDepart () {
|
|
chooseDepart () {
|
|
this.$refs.departs.blur()
|
|
this.$refs.departs.blur()
|
|
this.$refs.depart.init('0')
|
|
this.$refs.depart.init('0')
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 选择医药类别
|
|
|
|
+ acceptDrug (selections) {
|
|
|
|
+ console.log('接收的物料类别', selections)
|
|
|
|
+ const sleObj = {}
|
|
|
|
+ sleObj.drugId = selections.id
|
|
|
|
+ sleObj.drugCode = selections.code
|
|
|
|
+ sleObj.drugName = selections.name
|
|
|
|
+ this.sysMaterialMedcineItemApply.push(sleObj)
|
|
|
|
+ },
|
|
|
|
+ // 医药类别子表的显示列表
|
|
|
|
+ chooseDrug () {
|
|
|
|
+ this.$refs.drug.init()
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -1586,6 +1579,7 @@ export default {
|
|
height: calc(100vh - 84px);
|
|
height: calc(100vh - 84px);
|
|
padding: 12px;
|
|
padding: 12px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
+ overflow-y: auto;
|
|
}
|
|
}
|
|
.btn_group {
|
|
.btn_group {
|
|
width: 100%;
|
|
width: 100%;
|