|
@@ -32,9 +32,6 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</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-col>
|
|
|
</el-row>
|
|
@@ -107,9 +104,6 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</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-col>
|
|
|
<el-col :span="8">
|
|
@@ -129,9 +123,6 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</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-col>
|
|
|
</el-row>
|
|
@@ -522,7 +513,6 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <!-- <el-input disabled v-model="basicForm.purchasingOrganization"></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -542,7 +532,6 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <!-- <el-input :disabled = "disable || orgControl" v-model="basicForm.businessDepartment"></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -661,40 +650,42 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <!-- <el-row style="margin-bottom: 12px;">
|
|
|
+ <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-button :disabled="disable || isControl" type="primary" size="small" plain @click="addLine">新增</el-button>
|
|
|
+ <el-button :disabled="disable || isControl" 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="basicForm2.medicineTypeChanges"
|
|
|
+ :data="sysMaterialMedcineItemApply"
|
|
|
class="request-table"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
- <el-table-column label="序号" align="center" prop="sort">
|
|
|
+ <el-table-column label="物料类别ID" align="center" prop="sort">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.sort"></el-input>
|
|
|
+ <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="物料类别" align="center" prop="medicineCode">
|
|
|
+ <el-table-column label="物料类别code" align="center" prop="medicineCode">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.medicineCode"></el-input>
|
|
|
+ <el-input readonly v-model="scope.row.drugCode"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="类别名称" align="center" prop="medicineName">
|
|
|
+ <el-table-column label="物料类别名称" align="center" prop="medicineName">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.medicineName"></el-input>
|
|
|
+ <el-input readonly v-model="scope.row.drugName"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
- </el-row> -->
|
|
|
+ </el-row>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane label="单据信息" name="fourth">
|
|
@@ -847,6 +838,14 @@
|
|
|
:selectData="selectData11"
|
|
|
:single="true"
|
|
|
/>
|
|
|
+
|
|
|
+ <drug
|
|
|
+ ref="drug"
|
|
|
+ @doSubmit="acceptDrug"
|
|
|
+ :selectData="selectData12"
|
|
|
+ :single="true"
|
|
|
+ />
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -859,9 +858,12 @@ import tax from '@/components/PopDialog/tax.vue'
|
|
|
import staff from '@/components/PopDialog/staff.vue'
|
|
|
import serviceline from '@/components/PopDialog/serviceline.vue'
|
|
|
import dose from '@/components/PopDialog/dose.vue'
|
|
|
+// 公用一个树形(组织部门传值不同)
|
|
|
import orgs 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 { getDetail } from '@/api/classify/basic';
|
|
@@ -883,7 +885,8 @@ export default {
|
|
|
serviceline,
|
|
|
dose,
|
|
|
orgs,
|
|
|
- depart
|
|
|
+ depart,
|
|
|
+ drug
|
|
|
},
|
|
|
props: ['pageStu', 'row', 'disable'],
|
|
|
model: {
|
|
@@ -1024,6 +1027,8 @@ export default {
|
|
|
// medicineTypeChanges:[
|
|
|
// ],
|
|
|
},
|
|
|
+ // 医药属性子表
|
|
|
+ sysMaterialMedcineItemApply: [],
|
|
|
|
|
|
// tableList: [],
|
|
|
// 子表选中
|
|
@@ -1040,7 +1045,8 @@ export default {
|
|
|
selectData8: [],
|
|
|
selectData9: [],
|
|
|
selectData10: [],
|
|
|
- selectData11: []
|
|
|
+ selectData11: [],
|
|
|
+ selectData12: []
|
|
|
}
|
|
|
},
|
|
|
// watch: {
|
|
@@ -1291,6 +1297,10 @@ export default {
|
|
|
if (res.data.sysMaterialMedcineApply && res.data.sysMaterialMedcineApply.dosageFrom) {
|
|
|
this.getDoseDetails(res.data.sysMaterialMedcineApply.dosageFrom)
|
|
|
}
|
|
|
+ // 物料类别回显
|
|
|
+ if (res.data.sysMaterialMedcineItemApply) {
|
|
|
+ this.sysMaterialMedcineItemApply = res.data.sysMaterialMedcineItemApply
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1298,6 +1308,7 @@ export default {
|
|
|
if(this.pageStu == 'edit') {
|
|
|
let sparams = {...this.basicForm, ...{status: 0}}
|
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
|
console.log('提交参数', sparams)
|
|
|
this.$refs['basic'].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -1316,6 +1327,7 @@ export default {
|
|
|
// alert('保存传status:0')
|
|
|
let sparams = {...this.basicForm, ...{status: 0}}
|
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
|
console.log('保存参数', sparams)
|
|
|
this.$refs['basic'].validate((valid) => {
|
|
|
if(valid) {
|
|
@@ -1336,6 +1348,7 @@ export default {
|
|
|
// alert('提交传status:1')
|
|
|
let sparams = {...this.basicForm, ...{status: 1}}
|
|
|
sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
|
console.log('提交参数', sparams)
|
|
|
this.$refs['basic'].validate((valid) => {
|
|
|
if(valid) {
|
|
@@ -1360,39 +1373,42 @@ export default {
|
|
|
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)
|
|
|
- // },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.ids = val
|
|
|
+ console.log('this.ids',this.ids)
|
|
|
+ },
|
|
|
+ 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) {
|
|
@@ -1510,7 +1526,20 @@ export default {
|
|
|
chooseDepart () {
|
|
|
this.$refs.departs.blur()
|
|
|
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>
|