|
@@ -517,13 +517,56 @@
|
|
</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="purchasingOrganization">
|
|
|
|
+ <el-select
|
|
|
|
+ ref="organizations"
|
|
|
|
+ v-model="basicForm.purchasingOrganization"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ clearable
|
|
|
|
+ :disabled="disable"
|
|
|
|
+ @clear="controlOrg"
|
|
|
|
+ @focus="chooseOrganizations"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in organizationsOptions"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ <!-- <el-input disabled v-model="basicForm.purchasingOrganization"></el-input> -->
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="业务部门" prop="businessDepartment">
|
|
|
|
+ <el-select
|
|
|
|
+ ref="departs"
|
|
|
|
+ v-model="basicForm.businessDepartment"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ clearable
|
|
|
|
+ :disabled = "disable || orgControl"
|
|
|
|
+ @focus="chooseDepart"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in departOptions"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :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">
|
|
<el-form-item label="启用状态" prop="isEnable">
|
|
<el-form-item label="启用状态" prop="isEnable">
|
|
<el-input disabled v-model="basicForm.isEnable"></el-input>
|
|
<el-input disabled v-model="basicForm.isEnable"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="20">
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-form-item label="备注" prop="remark">
|
|
- <el-input :disabled="disable" v-model="basicForm.remark"></el-input>
|
|
|
|
|
|
+ <el-input disabled v-model="basicForm.remark"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -669,17 +712,6 @@
|
|
</el-row> -->
|
|
</el-row> -->
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
|
|
- <!-- <el-tab-pane label="修改记录" name="third">
|
|
|
|
- <el-table
|
|
|
|
- :data="basicForm.changeRecords"
|
|
|
|
- class="request-table"
|
|
|
|
- >
|
|
|
|
- <el-table-column label="字段名称" align="center" prop="pageCondtion" />
|
|
|
|
- <el-table-column label="变更前" align="center" prop="beforeChangeValue" />
|
|
|
|
- <el-table-column label="变更后" align="center" prop="afterChangeValue" />
|
|
|
|
- </el-table>
|
|
|
|
- </el-tab-pane> -->
|
|
|
|
-
|
|
|
|
<el-tab-pane label="单据信息" name="fourth">
|
|
<el-tab-pane label="单据信息" name="fourth">
|
|
<el-form :model="basicForm" ref="info" label-width="160px">
|
|
<el-form :model="basicForm" ref="info" label-width="160px">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
@@ -823,6 +855,20 @@
|
|
:selectData="selectData9"
|
|
:selectData="selectData9"
|
|
:single="true"
|
|
:single="true"
|
|
/>
|
|
/>
|
|
|
|
+
|
|
|
|
+ <orgs
|
|
|
|
+ ref="orgs"
|
|
|
|
+ @doSubmit="acceptOrgs"
|
|
|
|
+ :selectData="selectData10"
|
|
|
|
+ :single="true"
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
+ <depart
|
|
|
|
+ ref="depart"
|
|
|
|
+ @doSubmit="acceptDepart"
|
|
|
|
+ :selectData="selectData11"
|
|
|
|
+ :single="true"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -836,13 +882,16 @@ 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 depart from '@/components/PopDialog/organization.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';
|
|
// 生产厂商/代理人调用用于回显
|
|
// 生产厂商/代理人调用用于回显
|
|
import { getProductFactory } from '@/api/changeApply/basic'
|
|
import { getProductFactory } from '@/api/changeApply/basic'
|
|
// 计量单位,产地调用用于回显
|
|
// 计量单位,产地调用用于回显
|
|
-import { getUnit, getPlace, getTax, getStaff, getLine, getDose} from '@/api/requisition/basic'
|
|
|
|
|
|
+import { getUnit, getPlace, getTax, getStaff, getLine, getDose, getOrgs} from '@/api/requisition/basic'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'requisition_add',
|
|
name: 'requisition_add',
|
|
@@ -856,7 +905,9 @@ export default {
|
|
tax,
|
|
tax,
|
|
staff,
|
|
staff,
|
|
serviceline,
|
|
serviceline,
|
|
- dose
|
|
|
|
|
|
+ dose,
|
|
|
|
+ orgs,
|
|
|
|
+ depart
|
|
},
|
|
},
|
|
props: ['pageStu', 'row', 'disable'],
|
|
props: ['pageStu', 'row', 'disable'],
|
|
model: {
|
|
model: {
|
|
@@ -873,8 +924,11 @@ export default {
|
|
staffOptions: [],
|
|
staffOptions: [],
|
|
lineOptions: [],
|
|
lineOptions: [],
|
|
doseOptions: [],
|
|
doseOptions: [],
|
|
|
|
+ organizationsOptions: [],
|
|
|
|
+ departOptions: [],
|
|
tabValue: 'first',
|
|
tabValue: 'first',
|
|
isControl: true,
|
|
isControl: true,
|
|
|
|
+ orgControl: true,
|
|
basicForm: {
|
|
basicForm: {
|
|
billCode: '',
|
|
billCode: '',
|
|
orgId: '',
|
|
orgId: '',
|
|
@@ -929,6 +983,10 @@ export default {
|
|
oneClass: '',
|
|
oneClass: '',
|
|
twoClass: '',
|
|
twoClass: '',
|
|
threeClass: '',
|
|
threeClass: '',
|
|
|
|
+ // 新增默认采购组织
|
|
|
|
+ purchasingOrganization: '',
|
|
|
|
+ // 新增业务部门
|
|
|
|
+ businessDepartment: '',
|
|
isEnable: '',
|
|
isEnable: '',
|
|
remark: '',
|
|
remark: '',
|
|
// 物料申请单-单据信息
|
|
// 物料申请单-单据信息
|
|
@@ -1002,7 +1060,9 @@ export default {
|
|
selectData6: [],
|
|
selectData6: [],
|
|
selectData7: [],
|
|
selectData7: [],
|
|
selectData8: [],
|
|
selectData8: [],
|
|
- selectData9: []
|
|
|
|
|
|
+ selectData9: [],
|
|
|
|
+ selectData10: [],
|
|
|
|
+ selectData11: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// watch: {
|
|
// watch: {
|
|
@@ -1070,6 +1130,12 @@ export default {
|
|
console.log('页面状态',this.pageStu)
|
|
console.log('页面状态',this.pageStu)
|
|
console.log('数据', this.row)
|
|
console.log('数据', this.row)
|
|
this.getDetails(this.row)
|
|
this.getDetails(this.row)
|
|
|
|
+ // 控制业务部门是否能够填写
|
|
|
|
+ if (this.row.purchasingOrganization) {
|
|
|
|
+ this.orgControl = false
|
|
|
|
+ } else {
|
|
|
|
+ this.orgControl = true
|
|
|
|
+ }
|
|
// 控制医药属性是否能够填写
|
|
// 控制医药属性是否能够填写
|
|
if (this.row.isMedicine == '0') {
|
|
if (this.row.isMedicine == '0') {
|
|
this.isControl = false
|
|
this.isControl = false
|
|
@@ -1114,9 +1180,14 @@ export default {
|
|
console.log(tab, event);
|
|
console.log(tab, event);
|
|
console.log('页面状态',this.pageStu)
|
|
console.log('页面状态',this.pageStu)
|
|
},
|
|
},
|
|
|
|
+ // 选择采购组织时控制业务部门
|
|
|
|
+ controlOrg(val) {
|
|
|
|
+ this.basicForm.businessDepartment = ''
|
|
|
|
+ this.orgControl = true
|
|
|
|
+ },
|
|
// 选择是否医药物料时控制医药属性
|
|
// 选择是否医药物料时控制医药属性
|
|
controlMedic(val) {
|
|
controlMedic(val) {
|
|
- console.log('val',val)
|
|
|
|
|
|
+ console.log('val1111111',val)
|
|
if (val == '0') {
|
|
if (val == '0') {
|
|
this.isControl = false
|
|
this.isControl = false
|
|
} else {
|
|
} else {
|
|
@@ -1205,12 +1276,36 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 采购组织回显
|
|
|
|
+ getOrgDetails(id) {
|
|
|
|
+ getOrgs({deptId: id}).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.organizationsOptions = res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 业务部门回显
|
|
|
|
+ getDepartDetails(id) {
|
|
|
|
+ getOrgs({deptId: id}).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.departOptions = res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 如果是详情进入,则调用详情接口
|
|
// 如果是详情进入,则调用详情接口
|
|
getDetails(row) {
|
|
getDetails(row) {
|
|
getReqDetail(row.id).then(res => {
|
|
getReqDetail(row.id).then(res => {
|
|
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.purchasingOrganization) {
|
|
|
|
+ this.basicForm.purchasingOrganization = res.data.purchasingOrganization
|
|
|
|
+ this.getOrgDetails(res.data.purchasingOrganization)
|
|
|
|
+ }
|
|
|
|
+ if(res.data.businessDepartment) {
|
|
|
|
+ this.basicForm.businessDepartment = res.data.businessDepartment
|
|
|
|
+ this.getDepartDetails(res.data.businessDepartment)
|
|
|
|
+ }
|
|
if(res.data.unitId) {this.basicForm.unitId = res.data.unitId.toString()}
|
|
if(res.data.unitId) {this.basicForm.unitId = res.data.unitId.toString()}
|
|
if(res.data.manufacturerId) {this.basicForm.manufacturerId = res.data.manufacturerId.toString()}
|
|
if(res.data.manufacturerId) {this.basicForm.manufacturerId = res.data.manufacturerId.toString()}
|
|
if(res.data.usefulLifeUnitId) {this.basicForm.usefulLifeUnitId = res.data.usefulLifeUnitId.toString()}
|
|
if(res.data.usefulLifeUnitId) {this.basicForm.usefulLifeUnitId = res.data.usefulLifeUnitId.toString()}
|
|
@@ -1451,11 +1546,35 @@ export default {
|
|
this.basicForm2.dosageFrom = selections.id
|
|
this.basicForm2.dosageFrom = selections.id
|
|
this.getDoseDetails(selections.id)
|
|
this.getDoseDetails(selections.id)
|
|
},
|
|
},
|
|
- // 业务线显示列表
|
|
|
|
|
|
+ // 剂型显示列表
|
|
chooseDose () {
|
|
chooseDose () {
|
|
this.$refs.doses.blur()
|
|
this.$refs.doses.blur()
|
|
this.$refs.dose.init()
|
|
this.$refs.dose.init()
|
|
},
|
|
},
|
|
|
|
+ // 选择默认采购组织
|
|
|
|
+ acceptOrgs (selections) {
|
|
|
|
+ console.log('接收的采购组织', selections)
|
|
|
|
+ this.basicForm.purchasingOrganization = selections.id
|
|
|
|
+ // 控制业务部门是否可以选择
|
|
|
|
+ this.orgControl = false
|
|
|
|
+ this.getOrgDetails(selections.id)
|
|
|
|
+ },
|
|
|
|
+ // 默认采购组织显示列表
|
|
|
|
+ chooseOrganizations () {
|
|
|
|
+ this.$refs.organizations.blur()
|
|
|
|
+ this.$refs.orgs.init('1')
|
|
|
|
+ },
|
|
|
|
+ // 选择业务部门
|
|
|
|
+ acceptDepart (selections) {
|
|
|
|
+ console.log('接收的业务部门', selections)
|
|
|
|
+ this.basicForm.businessDepartment = selections.id
|
|
|
|
+ this.getDepartDetails(selections.id)
|
|
|
|
+ },
|
|
|
|
+ // 业务部门显示列表
|
|
|
|
+ chooseDepart () {
|
|
|
|
+ this.$refs.departs.blur()
|
|
|
|
+ this.$refs.depart.init('0')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|